geminiinstall

package
v1.48.4 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: GPL-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package geminiinstall owns the explicit Gemini notification lifecycle.

Index

Constants

View Source
const (
	GeminiToastAppID = opencodeinstall.GeminiToastAppID
)

GeminiToastAppID is shared by actual shortcut staging/readiness and the trusted Windows toast factory supplied by the business consumer lane.

Variables

This section is empty.

Functions

func Apply

func Apply(ctx context.Context, r Request) error

Apply composes the existing transaction kernel with the actual public UAP planner. Only our receipt and binary are ledger files; native settings use ConfigPaths and are read/planned in Prepare under both existing locks.

func ChannelsFromSnapshot

func ChannelsFromSnapshot(s installruntime.PolicySnapshot, root, executable, binding, goos, goarch string) (bool, bool)

func PrepareNativeSpool

func PrepareNativeSpool(ctx context.Context, controlRoot string) (string, error)

func RegisteredFromSnapshot

func RegisteredFromSnapshot(s installruntime.PolicySnapshot, root, executable, binding, goos, goarch string) bool

RegisteredFromSnapshot checks installer-owned receipt/runtime identities and delegates native group ownership to UAP. Native activation and trust are left to Gemini; installation never changes those policies.

func ResolveConfigRoot

func ResolveConfigRoot(r Request) (string, error)

ResolveConfigRoot observes the same single profile authority as Apply. GeminiHome is the parent of .gemini; ConfigRoot takes precedence. It does not read settings, create directories, or launch Gemini.

func RevokeChannels

func RevokeChannels(ctx context.Context, controlRoot, runtimeRoot string) error

RevokeChannels is the first removal step, before reading the receipt, native settings or delivery assets. Cleanup can then retain a foreign-edit conflict without leaving the old installed command authorized to deliver.

func SetupPermission

func SetupPermission(context.Context, string, bool) (string, error)

func SnapshotCurrent

func SnapshotCurrent(root string, expected installruntime.PolicySnapshot) bool

SnapshotCurrent is read-only and never acquires another policy lease. It can be used both before an effect and under the effect owner's retained lease.

func StageWindowsShortcut

func StageWindowsShortcut(home, target string, desktop bool, ledger installruntime.Ledger) (*installruntime.File, error)

func WindowsShortcutReady

func WindowsShortcutReady(controlRoot, executable string) error

Types

type Action

type Action string
const (
	Install Action = "install"
	Update  Action = "update"
	Remove  Action = "remove"
	Recover Action = "recover"
)

type Inspection

type Inspection struct {
	Status     string `json:"status"`
	Registered bool   `json:"registered"`
	Desktop    bool   `json:"desktop"`
	Webhook    bool   `json:"webhook"`
}

Inspection reports managed registration and recorded channel consent. It does not claim native hook activation, OS permission or destination readiness.

func Inspect

func Inspect(ctx context.Context, r Request) (Inspection, error)

Inspect never creates locks, repairs assets, recovers transactions or invokes a native helper. A damaged registration remains a conflict, even if revoked.

type Request

type Request struct {
	Action                                               Action
	ControlRoot, RuntimeRoot, BinarySource, NativeSource string
	HomeDir, GeminiHome, ConfigRoot                      string
	Desktop, Webhook                                     bool
	GOOS, GOARCH                                         string
	// Fault forwards the existing kernel test seam; the CLI never supplies it.
	Fault func(string) error
}

func DefaultRequest

func DefaultRequest(action Action) Request

Jump to

Keyboard shortcuts

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