Documentation
¶
Overview ¶
Package devbaseline exports offline, explicitly allowlisted preferences and an inactive installation inventory. It never copies a profile tree or executable.
Index ¶
Constants ¶
const Policy = "safe-preferences-and-inactive-inventory-v1"
Variables ¶
var ErrDestinationExists = errors.New("baseline destination must be a new stopped development profile")
var ErrSourceBusy = errors.New("baseline source is running: stop the source instance before taking a snapshot")
Functions ¶
func SameContent ¶ added in v0.32.0
SameContent compares validated copy-policy content, not explanatory labels. It never rewrites either snapshot or its published receipt.
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 Result ¶
type Result struct {
StateRoot string `json:"stateRoot"`
ManifestPath string `json:"manifestPath"`
Plugins []Plugin `json:"plugins"`
Policy string `json:"policy"`
CopiedScope []string `json:"copiedScope"`
Exclusions []string `json:"exclusions"`
}
func Import ¶
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 InspectImport ¶ added in v0.32.0
InspectImport validates the published import receipt and readable settings. It does not claim that integrations or plugins are configured or runnable.
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.