Documentation
¶
Overview ¶
Package lockfile reads and writes txco.packages.lock.yaml — the repo-root, committed record of which packages produced the workspace's materialized files (workspace PROVENANCE). It is deliberately separate from the chassis's server-side manifest_hash / version lineage (runtime truth); see docs/txco-oci-packages.md §7.
The lockfile is tool-owned (no user comments), so a yaml.Marshal round-trip is safe here — unlike txco.yaml, which install never rewrites.
Index ¶
Constants ¶
const FileName = "txco.packages.lock.yaml"
FileName is the lockfile name; it lives at the workspace root and is committed.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Ref string `yaml:"ref"` // exactly what the user typed
Registry string `yaml:"registry,omitempty"` // provenance
Namespace string `yaml:"namespace,omitempty"` // provenance
Name string `yaml:"name"` // manifest identity
Version string `yaml:"version"` // manifest identity
Resolved string `yaml:"resolved,omitempty"` // oci://…@sha256 (Phase 2)
ExportedStack string `yaml:"exportedStack,omitempty"` // stack the package ships
InstalledAs string `yaml:"installedAs,omitempty"` // where it was materialized
Mode string `yaml:"mode"` // as-stack | vendor-only
ManifestHash string `yaml:"manifestHash,omitempty"` // localManifestHash of materialized files
SignedBy string `yaml:"signedBy,omitempty"` // trusted signer key id, when verified (Phase 5)
InstalledAt string `yaml:"installedAt"`
}
Entry records one installed package. registry/namespace/resolved are PROVENANCE from the resolved ref (blank for dir:/file: sources in Phase 1, filled when OCI lands); name/version are the package's own identity.
type File ¶
type File struct {
Packages []Entry `yaml:"packages"`
}
func (*File) FindStack ¶
FindStack returns the entry that installed the given stack, or nil. Used to decide whether install owns a stack dir (safe to overwrite) vs. would clobber untracked content.