installation

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2026 License: MIT Imports: 35 Imported by: 0

Documentation

Overview

Package installation manages per-user node configuration and background startup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func API

func API(cfg node.Config) string

func ApplyStartupChange added in v0.5.0

func ApplyStartupChange(ctx context.Context, config, dataDir, id string) error

ApplyStartupChange runs only in the detached helper after the old supervisor exits. It validates the profile again and retains all identity and work files.

func BinPath

func BinPath() (string, error)

func CheckHybridSystem added in v0.5.0

func CheckHybridSystem(ctx context.Context, binary, config, mode string) error

CheckHybridSystem verifies the privileged install's ownership and startup context before consuming an invitation or registering a privileged service.

func CheckServiceMode

func CheckServiceMode(mode string) error

func CheckServiceProfile

func CheckServiceProfile(config, mode string) error

CheckServiceProfile validates installation privileges before credentials are issued or an invitation is redeemed, including system-to-user migration.

func ConfigPath

func ConfigPath() string

func FinishRetiredHelper

func FinishRetiredHelper(id string)

FinishRetiredHelper releases a one-shot service-manager registration after the helper has written its result. Linux transient units collect themselves.

func Home

func Home() string

func InstallAgent

func InstallAgent(ctx context.Context, agent, project, binary, config string, mcp, skill bool) error

func InstallSelf

func InstallSelf(ctx context.Context) (string, error)

func InstallSystemSelf added in v0.5.0

func InstallSystemSelf(ctx context.Context) (string, error)

InstallSystemSelf installs a private service executable without adding its administrator-only directory to the interactive user's PATH.

func PrepareStartupChange added in v0.5.0

func PrepareStartupChange(ctx context.Context, config, id, mode string) error

PrepareStartupChange never prompts for elevation. Only Windows supports an identity-preserving System migration. Hybrid and Unix need local installers.

func ReadConfig

func ReadConfig(path string) (node.Config, error)

func SaveAdmin

func SaveAdmin(p AdminProfile) error

func SaveUpdateAdmin

func SaveUpdateAdmin(p AdminProfile) error

func ScheduleRetiredUninstall

func ScheduleRetiredUninstall(config, id string) error

ScheduleRetiredUninstall starts an independent cleanup process. It must outlive both the node and its supervisor, including their service-manager process group. Unmanaged node processes have no installation to remove.

func Service

func Service(ctx context.Context, operation, binary, config, mode string) error

func ServiceMode

func ServiceMode(config, mode string) (string, error)

ServiceMode resolves the saved startup selection without changing the profile.

func StartTunnelService

func StartTunnelService(ctx context.Context, binary, dir string) error

StartTunnelService installs a separate user startup entry, never a fleet node.

func UninstallRetired

func UninstallRetired(ctx context.Context, config, dataDir, id string) error

UninstallRetired removes only an installation whose identity has a durable unregistration policy. The installation lock serializes cleanup with enrollment; the runtime and node locks ensure work has stopped before deleting the launcher.

func ValidateServiceMode

func ValidateServiceMode(mode string) error

ValidateServiceMode rejects unknown startup modes on every platform.

func WindowsRuntimePath

func WindowsRuntimePath(dir string) string

WindowsRuntimePath is the stable executable path covered by the node's firewall rules. The supervisor publishes verified copies here between runs.

Types

type AdminProfile

type AdminProfile struct {
	Gateway string `json:"gateway"`
	Key     string `json:"key"`
}

func ReadAdmin

func ReadAdmin() (AdminProfile, error)

func ReadUpdateAdmin

func ReadUpdateAdmin() (AdminProfile, error)

type AgentPaths

type AgentPaths struct {
	MCP, Skill string
	ServerPath []string
	TOML       bool
}

func AgentLocations

func AgentLocations(agent, home, project string) (AgentPaths, error)

type UpdateResult

type UpdateResult struct {
	Path    string
	Version string
	Changed bool
}

func UpdateSelf

func UpdateSelf(ctx context.Context, repository, version string) (UpdateResult, error)

UpdateSelf replaces the invoked CLI, independently of gateway-managed services.

Jump to

Keyboard shortcuts

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