-
ConfigKit v1.2.0 Stable
released this
2026-11-10 14:59:35 +00:00 | 0 commits to main since this releaseConfigKit v1.2.0
LoadLayeredcan now use the resolved main configuration's filesystem context
to find companion imports and the selected overlay in a single load. For example,
an application that discovers/srv/campaign/config.ymlcan import fragments
from/srv/campaign/prompts/and apply
/srv/campaign/overlays/production.yml, regardless of its working directory.Main-relative companion inputs
Set
Input.MainRelativetoMainRelative()on a non-file underlay to use the
main input's resolved context. Enable imports separately and declare the files
or directories to load. A concreteInput.Filesystemtakes precedence over the
binding. The derived context keeps the main input's filesystem namespace and
containment root, with lookup starting at its resolved base directory.When the main supplies no usable context, the companion can use a
MainRelativeContext.Fallback. Otherwise, optional imports are skipped and
the companion's own configuration still contributes. Required imports that
need targets fail, andRequireBaserequires a usable context even when imports
are disabled. Skipped imports produce no filesystem search evidence.The consumer example combines embedded defaults, operator imports, and a selected
overlay. Example ·
Layered loading contractOverlay lookup and filesystem checks
LoadLayerednow looks for a selected overlay usingOverlayFilesystem, the
resolved main context, orOverlayFallback, in that order. Derived and fallback
lookups start at the context's base directory. Explicit overlay contexts and
ordinaryLoaduse their existing root-relative lookup. A selected overlay
must exist in the chosen context.Native overlays resolve symlink targets when the filesystem exposes link
inspection. This catches targets outside the configured root and aliases of
already acquired files in the same namespace. Derived standalone host contexts
now check root access the same way explicit contexts do. Overlay contractUpgrade notes
Use keyed Go literals when constructing
InputandLayeredOptions. Both
types gained fields, so existing positional literals need updating. The minimum
consumer Go version is 1.27.0.Internally, imports with and without a filesystem base share root placement
and accounting. Directory import policies reuse default patterns, and companions
in the same tier share one derived context.The repository also adopted upstream documentation, licensing, and release
policy updates, including clearer guidance on when to write an ADR and what
compatibility means for existing configurations. Repository policiesDownloads