app

package
v0.33.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Package app provides the shared application core used by both the MCP server and the CLI. It handles module initialization, proxy connection, sandbox setup, and semantic search indices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ModuleRegistry *module.Registry
	Sandbox        sandbox.Service
	ProxyClient    proxy.Client
	LocalProxy     proxy.Server
	Cartographoor  cartographoor.CartographoorClient
	// contains filtered or unexported fields
}

App contains the shared core components used by both the MCP server and CLI.

func New

func New(log logrus.FieldLogger, cfg *config.Config) *App

New creates a new App.

func (*App) ArmDiscoveryRefresh added in v0.32.0

func (a *App) ArmDiscoveryRefresh(registrar func(module.Module))

ArmDiscoveryRefresh enables the background discovery hook and installs the registrar used to register resources for modules that activate after the server is built (e.g. a local Kurtosis datasource appearing later). It runs one refresh immediately to catch datasources discovered while the hook was still disarmed.

func (*App) Build

func (a *App) Build(ctx context.Context) error

Build initializes all shared components in dependency order: register modules -> sandbox -> proxy -> init modules -> module startup -> cartographoor.

func (*App) Config

func (a *App) Config() *config.Config

Config returns the application configuration.

func (*App) Stop

func (a *App) Stop(ctx context.Context) error

Stop cleans up all started components in reverse order, joining any component shutdown errors.

Jump to

Keyboard shortcuts

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