Documentation
¶
Overview ¶
Package mcpmanager owns application-lifetime MCP connections and leases immutable tool snapshots to conversation runtimes.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Lease ¶
type Lease struct {
// contains filtered or unexported fields
}
Lease is one conversation's immutable view of tools and server statuses.
func (*Lease) Close ¶
func (lease *Lease) Close()
Close releases this lease without closing connections still used by another runtime or retained by the active manager generation.
func (*Lease) Statuses ¶
func (lease *Lease) Statuses() []mcpclient.ServerStatus
Statuses returns an independent slice of secret-free diagnostics.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager loads one product-owned config and shares matching connections among conversation runtimes. Config generations are isolated so active runtimes retain their old connections while newly loaded runtimes use new settings.
func New ¶
New creates a manager and loads its initial configuration. Configuration errors are retained as lease diagnostics instead of preventing app startup.
func (*Manager) Acquire ¶
Acquire waits for every applicable server in the current generation and returns one immutable snapshot. Individual server failures are represented in Statuses and never fail the whole lease.
func (*Manager) Close ¶
func (manager *Manager) Close()
Close cancels initialization and closes every cached connection.
func (*Manager) Reload ¶
Reload installs the latest on-disk configuration as a new generation. Old connections remain alive until every lease using them has been released.
func (*Manager) Warm ¶
Warm starts resolving the servers visible to workspace without retaining a conversation lease. Connections from the active config generation remain cached for later sessions.
func (*Manager) WarmGlobal ¶
func (manager *Manager) WarmGlobal()
WarmGlobal starts workspace-independent HTTP servers. It is safe during app startup before any project or scratch workspace has been selected.