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

registry

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Catalogs outlive sessions and retain the last successful list across failures.

Package registry manages bounded downstream sessions, resilient catalogs and validated calls. An Engine belongs to one tap process and must be closed.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Message

func Message(err error) string

Message formats SDK errors without exposing credential-bearing endpoint URLs.

func WithResultScope

func WithResultScope(ctx context.Context, scope string) context.Context

WithResultScope binds references to the actual MCP session, never client-supplied metadata.

Types

type ArgumentReference

type ArgumentReference struct{ Target, Reference, Pointer string }

ArgumentReference explicitly copies one retained JSON value into an existing argument object. No marker in ordinary tool arguments is interpreted as a reference.

type Engine

type Engine struct {
	Path, Version string
	// contains filtered or unexported fields
}

Engine holds resident sessions and caches for one fixed config path and version.

func New

func New(path, version string) *Engine

New creates an engine without opening any downstream connections. Its settings are read once, here: a tap process keeps the ones it started with.

func (*Engine) Call

func (e *Engine) Call(ctx context.Context, id string, args any, quiet bool) (wire.Object, error)

Call validates and runs server.tool with inline results.

func (*Engine) CallWith

func (e *Engine) CallWith(ctx context.Context, id string, args any, quiet, retain bool, refs []ArgumentReference) (wire.Object, error)

CallWith enables explicit result retention and reference copies without application metadata.

func (*Engine) CallWithMeta

func (e *Engine) CallWithMeta(ctx context.Context, id string, args any, quiet bool, meta mcp.Meta) (wire.Object, error)

CallWithMeta forwards application metadata without forwarding protocol negotiation fields.

func (*Engine) CallWithOptions

func (e *Engine) CallWithOptions(ctx context.Context, id string, args any, quiet, retain bool, refs []ArgumentReference, meta mcp.Meta) (wire.Object, error)

CallWithOptions enforces policy and a live contract before execution; calls are never retried.

func (*Engine) Close

func (e *Engine) Close()

Close waits for workers, flushes queued catalogs, and tears down every transport.

func (*Engine) Discover

func (e *Engine) Discover(ctx context.Context, opt SearchOptions, quiet bool) (wire.Object, error)

Discover searches or browses scoped catalogs and discloses only the requested detail.

func (*Engine) Drop

func (e *Engine) Drop(ctx context.Context, id string) (wire.Object, error)

Drop explicitly releases one reference without executing any backend operation.

func (*Engine) Inspect

func (e *Engine) Inspect(ctx context.Context, id, pointer string, offset, limit, maxBytes int) (wire.Object, error)

Inspect returns a selected value or deterministic array/object page, bounded by serialized bytes.

func (*Engine) Listing

func (e *Engine) Listing(ctx context.Context, quiet bool) (wire.Object, error)

Listing returns catalog counts, marking stale rows and last refresh errors.

func (*Engine) Overview

func (e *Engine) Overview() string

Overview lists a bounded set of integration names without starting any server.

func (*Engine) Refresh

func (e *Engine) Refresh(ctx context.Context, server string, quiet bool) (wire.Object, error)

Refresh waits for live discovery of the selected server or all integrations.

func (*Engine) Search

func (e *Engine) Search(ctx context.Context, query string, limit float64, quiet bool) (wire.Object, error)

Search keeps the shell's full-schema search and original numeric limit semantics.

func (*Engine) Settings

func (e *Engine) Settings() config.Values

Settings returns the settings this engine was started with.

func (*Engine) Warm

func (e *Engine) Warm()

Warm reads the saved tool lists, so the first search does not wait for them, and starts the servers whose start setting is start. It starts no other server.

type Failure

type Failure struct{ Code, Message, Recovery string }

Failure classifies gateway failures without guessing whether a downstream write succeeded.

func (*Failure) Error

func (f *Failure) Error() string

Error supplies a concise CLI diagnostic; structured MCP errors retain the code and recovery.

type SearchOptions

type SearchOptions struct {
	Query, Server, Detail string
	IDs                   []string
	Limit                 float64
	Offset, MaxBytes      int
	Refresh               bool
}

SearchOptions chooses search, exact inspection or server browsing within one tool. Auto disclosure returns complete schemas when they fit, otherwise labeled summaries.

Jump to

Keyboard shortcuts

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