bootstrap

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadRuntimeConfig

func LoadRuntimeConfig() (config.RuntimeConfig, error)

func NewApplicationLogger added in v0.2.0

func NewApplicationLogger(errOut io.Writer) (*slog.Logger, error)

NewApplicationLogger 从当前配置建立一次应用根 logger。它不触碰 slog 全局默认值; CLI 与 MCP 将其显式传入所有下游组件,确保诊断永远离开 stdout 协议通道。

func NewAutomaticUpdateChecker

func NewAutomaticUpdateChecker(proxy string) (*update.AutomaticUpdateChecker, error)

NewAutomaticUpdateChecker 组装普通 CLI 命令后的只读更新检查依赖。 自动检查不复用显式更新编排器,避免意外执行安装策略或继承其输出语义。

func NewServices

func NewServices(logger *slog.Logger) application.Services

func NewUpdateCoordinator

func NewUpdateCoordinator(proxy string, out, errOut io.Writer) (*update.UpdateCoordinator, error)

NewUpdateCoordinator 组装显式更新命令使用的生产依赖。 CLI 仅提供 flags、输出和配置覆盖,更新网络与进程依赖统一由 bootstrap 持有。

func RunMCP

func RunMCP(ctx context.Context, errOut io.Writer, proxyOverride *string) error

Types

type AuthFileRepository

type AuthFileRepository struct{}

func (AuthFileRepository) Load

func (AuthFileRepository) Save

func (AuthFileRepository) Save(store auth.AuthStore) error

type ConfigFileStore

type ConfigFileStore struct{}

func (ConfigFileStore) Get

func (ConfigFileStore) Path

func (ConfigFileStore) Path() (string, error)

func (ConfigFileStore) Set

func (ConfigFileStore) Unset

type MCPRuntime

type MCPRuntime struct {
	Config     config.RuntimeConfig
	Manager    *download.Manager
	Logger     *slog.Logger
	SDK        application.SDKService
	SDKRequest application.SDKClientRequest
	AuthPath   string
}

func NewMCPRuntime

func NewMCPRuntime(ctx context.Context, logger *slog.Logger, proxyOverride *string) (MCPRuntime, error)

Jump to

Keyboard shortcuts

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