registration

package
v1.45.13 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package registration performs pure, bounded managed MCP configuration edits. Changed documents are semantically serialized; comments and formatting may change. Prior ownership must come from trusted installer state, never configuration content.

Index

Constants

View Source
const MaxBytes = 1 << 20
View Source
const Server = "agent_notifications"

Variables

View Source
var (
	ErrInvalid   = errors.New("invalid_registration_config")
	ErrLimit     = errors.New("registration_size_limit")
	ErrConflict  = errors.New("managed_transport_conflict")
	ErrDuplicate = errors.New("duplicate_executable_conflict")
)

Functions

This section is empty.

Types

type Ownership

type Ownership struct {
	Provider  Provider
	Server    string
	Transport Transport
}

type Provider

type Provider string
const (
	Codex  Provider = "codex"
	Claude Provider = "claude"
)

type Request

type Request struct {
	Provider Provider
	Input    []byte // Zero length means missing configuration.
	Command  string // Trusted desired executable, compared literally (no filesystem lookup).
	Args     []string
	Previous *Ownership
	Remove   bool
}

type Result

type Result struct {
	Bytes   []byte
	Owned   *Ownership // Persist with the configuration through the installer's CAS.
	Changed bool
}

func Apply

func Apply(r Request) (Result, error)

Apply installs, updates, or explicitly removes only the matching managed server. It performs no I/O, executable resolution, consent, activation, or persistence.

type Transport

type Transport struct {
	Command     string
	Args        []string
	ArgsPresent bool
	Type        string
	TypePresent bool
}

Transport records exact field presence as well as values. Codex has no type field; Claude uses explicit stdio. An absent args field differs from an empty array.

Jump to

Keyboard shortcuts

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