Skip to main content

Lock file reference

lunapack-lock.yml is generated resolved state for installed packs and Luna Links. Luna owns this file. Commit it when your project commits generated lock state, but do not edit ownership, provenance, or digest fields by hand.

All paths are persisted with /. Project targets and local source roots are non-empty, non-escaping paths relative to the workspace. Pack paths and selected managed or link source paths are relative to their configured source or repository base path. Luna rejects a lock file whose effective pack or link target is rooted or contains a . or .. segment.

This representative local-pack lock shows how identity, ownership, and content evidence fit together:

schemaVersion: 1
packs:
- id: clean-code-guidelines
version: 1.0.0
sourceName: local-packs
sourceIdentity:
type: local
path: projects/packs
sourcePath: projects/packs
packPath: clean-code-guidelines
packs: []
managedFiles:
- declaredTargetPath: clean-code.md
targetPath: clean-code.md
sha256: 0000000000000000000000000000000000000000000000000000000000000000
strategy:
type: copy
method: overwrite
links: {}

Real SHA-256 values identify installed bytes; the zero value above is a shape placeholder, not content evidence to copy into a project.

Top-level fields

FieldTypeRequiredMeaning
schemaVersionInteger; only 1YesLock schema version.
packsResolved pack arrayYesInstalled root and transitive pack records.
linksMap of resolved linksNoInstalled Luna Links keyed by link name.

Link names use alphanumeric segments separated by single hyphens.

Resolved pack

Each packs item records one exact pack release.

FieldTypeRequiredMeaning
idStringYesResolved pack ID.
versionSemantic Version stringYesExact resolved release.
sourceNameStringYesConfigured project source name.
sourceIdentitySource identityYesSource coordinates used for identity checks.
sourcePathProject-relative pathLocalConfigured local source root.
packPathRelative pathYesResolved path to the pack manifest directory.
destinationProject-relative pathNoConsumer destination applied to this root.
packsPack reference arrayYesExact direct dependencies of this pack.
managedFilesManaged-file arrayYesFiles selected and owned for this pack.
externalSourcesMap of external source locksNoPack aliases mapped to approved sources.
gitSourceGit provenanceGit onlyGit coordinates and resolved commit.

A pack reference contains required id and exact version fields.

Source identity and Git provenance

A local source identity contains type: local and its source path. A Git source identity contains type: git, required url, and optional configured ref and repository-relative path.

Git provenance contains type: git, url, and resolvedCommit. It also keeps the configured ref and repository-relative path when present. A resolved commit is a 40- or 64-character hexadecimal object ID.

Each entry in externalSources is keyed by the alias declared in pack.yml and contains:

FieldTypeRequiredMeaning
sourceNameStringYesApproved project source used for alias.
fingerprintgit:/local: IDYesNormalized source identity evidence.
refStringYesCanonical Git ref used by the pack alias.
resolvedCommitHexadecimal object IDYesExact external Git revision.

Managed file

Each managedFiles item records the target that Luna owns and the bytes used to detect local changes.

FieldTypeRequiredMeaning
declaredTargetPathProject-relative pathYesTarget declared by the pack before remapping.
targetPathProject-relative pathYesEffective installed target after remapping.
sha25664 hex charactersYesDigest of installed resulting content.
strategyType/method objectNoApplied copy or merge strategy.
contentBase64 stringNoOriginal section source retained for removal.
sourceAliasStringConditionalPack-defined external source alias.
sourceNameStringConditionalApproved project source name.
sourceFingerprintgit:/local: IDConditionalNormalized approved source identity.
sourcePathSource-relative pathConditionalSelected path within external source.

The four external-source fields are all present or all absent. content is stored for section merges so uninstall can remove the section that pack added.

Each links value records one installed link.

FieldTypeRequiredMeaning
sourceNameStringYesConfigured source name.
sourceIdentitySource identityYesLocal or Git source coordinates.
definitionSha25664 hex charactersYesDigest used to detect definition changes.
gitSourceGit provenanceNoExact Git revision for a Git-backed link.
filesLink-file arrayYesSelected source and installed target records.

Each link file requires sourcePath, declaredTargetPath, targetPath, and a 64-character sha256 digest. Declared and effective targets differ when a remapping applies.

Use luna audit to inspect this evidence and identify modified targets or source drift. See Configuration for portable project intent and Luna Links for link selection and cache behavior.