browserinstall

package
v0.13.12 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Package browserinstall owns Redeven's optional browser distribution and consent.

Index

Constants

This section is empty.

Variables

View Source
var ErrDependenciesMissing = errors.New("browser system dependencies missing")
View Source
var ErrDisabled = errors.New("built-in browser is disabled; do not request installation")
View Source
var ErrInstallRequired = errors.New("built-in browser requires user-confirmed installation")
View Source
var ErrLaunchUnavailable = errors.New("browser executable could not start")
View Source
var ErrSystemPreparationRequired = errors.New("browser system preparation required")

Functions

func ArchiveSpec

func ArchiveSpec(pkg Package) artifactcache.Spec

ArchiveSpec maps the product's compiled browser catalog to the released acquisition contract. Callers must resolve Package through the catalog.

func InstallSystemBrowser

func InstallSystemBrowser(ctx context.Context, id string, input io.Reader, output io.Writer) error

InstallSystemBrowser is a short-lived privileged boundary. Its only selector is a package in this Runtime's compiled catalog; archive bytes are untrusted until the published verifier accepts them. No caller supplies paths or rules.

func PrepareComputerHelpers

func PrepareComputerHelpers(archivePath, stateDirectory string) (string, error)

PrepareComputerHelpers unpacks the immutable helper archive from an already verified Redeven Runtime suite. It never downloads a browser or executes code.

Types

type LaunchReadiness

type LaunchReadiness struct {
	State  string `json:"state"`
	Reason string `json:"reason,omitempty"`
	Action string `json:"action,omitempty"`
}

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func New

func New(root string, pkg Package) (*Manager, error)

func (*Manager) Cancel

func (m *Manager) Cancel(id string) (Status, error)

func (*Manager) Close

func (m *Manager) Close()

func (*Manager) CompleteUpload

func (m *Manager) CompleteUpload(id string) (Status, error)

func (*Manager) Executable

func (m *Manager) Executable() (string, error)

func (*Manager) PrepareSystem

func (m *Manager) PrepareSystem(packageID, source string) (Status, error)

PrepareSystem shares the installation operation and upload/download consent. A short-lived private stream carries the pinned archive to the authorized command and reports phases back. It carries no browser input or credentials.

func (*Manager) RequireSystemPreparation

func (m *Manager) RequireSystemPreparation()

Preserve an observed sandbox failure even if the trusted policy file remains on disk but its kernel policy has been unloaded. Only successful preparation clears this condition; the UI cannot infer or override launch readiness.

func (*Manager) SetEnabled

func (m *Manager) SetEnabled(enabled bool) (Status, error)

func (*Manager) Snapshot

func (m *Manager) Snapshot() Status

func (*Manager) Start

func (m *Manager) Start(packageID, source string) (Status, error)

func (*Manager) WriteChunk

func (m *Manager) WriteChunk(id string, offset int64, data []byte) (Status, error)

type Package

type Package struct {
	ID             string `json:"id"`
	Name           string `json:"name"`
	Platform       string `json:"platform"`
	Architecture   string `json:"architecture"`
	Version        string `json:"version"`
	URL            string `json:"url"`
	SHA256         string `json:"sha256"`
	SizeBytes      int64  `json:"size_bytes"`
	InstalledBytes int64  `json:"installed_bytes"`
	Executable     string `json:"executable"`
}

func ForID

func ForID(id string) (Package, error)

func ForPlatform

func ForPlatform(platform, architecture string) (Package, error)

func NativePackage

func NativePackage() (Package, error)

type Status

type Status struct {
	Launch               LaunchReadiness `json:"launch"`
	StorageBytes         int64           `json:"storage_bytes"`
	AuthorizationCommand string          `json:"authorization_command,omitempty"`
	Enabled              bool            `json:"enabled"`
	State                string          `json:"state"`
	Package              Package         `json:"package"`
	Directory            string          `json:"directory"`
	OperationID          string          `json:"operation_id,omitempty"`
	ReceivedBytes        int64           `json:"received_bytes"`
	Error                string          `json:"error,omitempty"`
}

Status is the single installation observation. It does not own task continuation.

Jump to

Keyboard shortcuts

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