devbaseline

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: AGPL-3.0 Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package devbaseline exports offline, explicitly allowlisted preferences and an inactive installation inventory. It never copies a profile tree or executable.

Index

Constants

View Source
const Policy = "safe-preferences-and-inactive-inventory-v1"

Variables

View Source
var ErrDestinationExists = errors.New("baseline destination must be a new stopped development profile")
View Source
var ErrSourceBusy = errors.New("baseline source is running: stop the source instance before taking a snapshot")

Functions

This section is empty.

Types

type Baseline

type Baseline struct {
	SchemaVersion int                       `json:"schemaVersion"`
	Policy        string                    `json:"policy"`
	CreatedAt     time.Time                 `json:"createdAt"`
	Source        Source                    `json:"source"`
	Preferences   map[string]map[string]any `json:"preferences"`
	Plugins       []Plugin                  `json:"plugins"`
	Exclusions    []string                  `json:"exclusions"`
}

Baseline is a portable logical snapshot, not a runnable plugin installation. Import treats every field as untrusted and reapplies the current copy policy.

func Snapshot

func Snapshot(ctx context.Context, opts SnapshotOptions) (*Baseline, error)

Snapshot acquires the application's root flock before opening settings read-only in one coherent bbolt View. Missing .lock may be created, but no source setting, inventory, legacy file, runtime record or directory is rewritten or recovered.

type ImportOptions

type ImportOptions struct {
	// Destination must be resolved by instance.Resolve, not a root from the environment.
	Destination instance.Profile
	Home        string
}

type Plugin

type Plugin struct {
	ID         string `json:"id"`
	Version    string `json:"version,omitempty"`
	Status     string `json:"status"`
	Provenance string `json:"provenance"`
}

type Result

type Result struct {
	StateRoot    string   `json:"stateRoot"`
	ManifestPath string   `json:"manifestPath"`
	Plugins      []Plugin `json:"plugins"`
}

func Import

func Import(ctx context.Context, b *Baseline, opts ImportOptions) (Result, error)

Import atomically publishes independent settings and baseline.json into a new stopped development profile. Inventory never becomes plugin_state.json and cannot trigger manager startup. Verified reinstallation uses existing manager install/link operations after the destination has been launched independently.

func Seed

func Seed(ctx context.Context, source SnapshotOptions, target ImportOptions) (Result, error)

Seed is the CLI integration entrypoint: validate target, snapshot a stopped source, then import. No host or plugin is launched. A16 owns command wiring.

type SnapshotOptions

type SnapshotOptions struct {
	SourceRoot string
	// SourceVersion is a nonsecret build version, never an arbitrary label/path.
	SourceVersion string
	// TemporaryRoot optionally places private legacy staging in a fixture root.
	TemporaryRoot string
}

type Source

type Source struct {
	RootID      string   `json:"rootID"`
	Version     string   `json:"version,omitempty"`
	AncestorIDs []string `json:"ancestorIDs"`
	LockMarker  string   `json:"lockMarker"`
}

Source contains no source filesystem paths, endpoints or private values.

Jump to

Keyboard shortcuts

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