Documentation
¶
Overview ¶
Package installation manages per-user node configuration and background startup.
Index ¶
- func API(cfg node.Config) string
- func ApplyStartupChange(ctx context.Context, config, dataDir, id string) error
- func BinPath() (string, error)
- func CheckHybridSystem(ctx context.Context, binary, config, mode string) error
- func CheckHybridUser() error
- func CheckLocalAPI(ctx context.Context, cfg node.Config, id *identity.Identity) error
- func CheckServiceMode(mode string) error
- func CheckServiceProfile(config, mode string) error
- func CheckUserStartup(ctx context.Context, mode string) error
- func ConfigPath() string
- func FinishRetiredHelper(id string)
- func Home() string
- func InstallAgent(ctx context.Context, agent, project, binary, config string, mcp, skill bool) error
- func InstallSelf(ctx context.Context) (string, error)
- func InstallSystemSelf(ctx context.Context) (string, error)
- func PrepareStartupChange(ctx context.Context, config, id, mode string) error
- func ReadConfig(path string) (node.Config, error)
- func RemoveRetiredHelper(config string)
- func SaveAdmin(p AdminProfile) error
- func SaveUpdateAdmin(p AdminProfile) error
- func ScheduleRetiredUninstall(config, id string) error
- func Service(ctx context.Context, operation, binary, config, mode string) error
- func ServiceMode(config, mode string) (string, error)
- func StartTunnelService(ctx context.Context, binary, dir string) error
- func UninstallRetired(ctx context.Context, config, dataDir, id string) error
- func UserStartupWarning() string
- func ValidateServiceMode(mode string) error
- func WindowsRuntimePath(dir string) string
- type AdminProfile
- type AgentPaths
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyStartupChange ¶ added in v0.5.0
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 CheckHybridSystem ¶ added in v0.5.0
CheckHybridSystem verifies the privileged install's ownership and startup context before consuming an invitation or registering a privileged service.
func CheckHybridUser ¶ added in v0.5.7
func CheckHybridUser() error
func CheckLocalAPI ¶ added in v0.5.7
CheckLocalAPI reports a local API port held by something other than this profile's own node. It allows a brief wait for a node that is still stopping.
func CheckServiceMode ¶
func CheckServiceProfile ¶
CheckServiceProfile validates installation privileges before credentials are issued or an invitation is redeemed, including system-to-user migration.
func CheckUserStartup ¶ added in v0.5.7
CheckUserStartup verifies the login-session service manager that User startup depends on. Other modes have no such dependency or fall back to a process.
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 InstallAgent ¶
func InstallSystemSelf ¶ added in v0.5.0
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
PrepareStartupChange never prompts for elevation. Only Windows supports an identity-preserving System migration. Hybrid and Unix need local installers.
func RemoveRetiredHelper ¶ added in v0.5.7
func RemoveRetiredHelper(config string)
RemoveRetiredHelper deletes the running uninstall helper of a retired Hybrid companion after cleanup succeeds. Other profiles reuse their state directory, and retry cleanup with the same helper if it fails.
func SaveAdmin ¶
func SaveAdmin(p AdminProfile) error
func SaveUpdateAdmin ¶
func SaveUpdateAdmin(p AdminProfile) error
func ScheduleRetiredUninstall ¶
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 ServiceMode ¶
ServiceMode resolves the saved startup selection without changing the profile.
func StartTunnelService ¶
StartTunnelService installs a separate user startup entry, never a fleet node.
func UninstallRetired ¶
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 UserStartupWarning ¶ added in v0.5.7
func UserStartupWarning() string
func ValidateServiceMode ¶
ValidateServiceMode rejects unknown startup modes on every platform.
func WindowsRuntimePath ¶
WindowsRuntimePath is the stable executable path covered by the node's firewall rules. The supervisor publishes verified copies here between runs.
Types ¶
type AdminProfile ¶
func ReadAdmin ¶
func ReadAdmin() (AdminProfile, error)
func ReadUpdateAdmin ¶
func ReadUpdateAdmin() (AdminProfile, error)
type AgentPaths ¶
func AgentLocations ¶
func AgentLocations(agent, home, project string) (AgentPaths, error)
type UpdateResult ¶
func UpdateSelf ¶
func UpdateSelf(ctx context.Context, repository, version string) (UpdateResult, error)
UpdateSelf replaces the invoked CLI, independently of gateway-managed services.