extensionmcp

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package extensionmcp defines instance-scoped MCP overrides and sticky runtime names.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNameTaken = errors.New("MCP server runtime name is already taken")
	ErrNotFound  = errors.New("extension MCP allocation not found")
)

Functions

This section is empty.

Types

type Override

type Override struct {
	Env     map[string]string
	Headers map[string]string
	URL     string
}

Override contains the editable fields applied over a published declaration.

func (Override) Apply

Apply validates the actual transport and auth policy after layering over the declaration.

func (Override) Validate

func (o Override) Validate() error

Validate rejects secret-bearing or malformed override values before mutation.

type Record

type Record struct {
	Target
	Override
	RuntimeName string
	UpdatedAt   time.Time
}

Record retains an allocation until the owning installed instance is removed.

type Store

type Store interface {
	List(context.Context, string, string) ([]Record, error)
	ListAll(context.Context) ([]Record, error)
	// Reserve allocates a stable runtime name; occupied includes effective registry names and manual definitions.
	Reserve(context.Context, Target, string, []string) (Record, error)
	Update(context.Context, Target, Override) error
	// DeleteTargets atomically releases the specified allocations.
	DeleteTargets(context.Context, []Target) error
	// DeleteWorkspace releases one installation across its profile projections atomically.
	DeleteWorkspace(context.Context, string, string) error
	// RetireWorkspace atomically releases allocations and records the completed lifecycle event.
	RetireWorkspace(context.Context, string, string, store.EventSummary) error
	// RetireTargets atomically releases exact allocations and records the completed scoped removal.
	RetireTargets(context.Context, []Target, store.EventSummary) error
	DeleteInstance(context.Context, string, string, string) error
}

Store serializes allocation with the persisted names in one scope cell.

type Target

type Target struct {
	Extension   string
	ProfileID   string
	WorkspaceID string
	ServerName  string
}

Target identifies the definition independently of its allocated runtime name.

Jump to

Keyboard shortcuts

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