Expose input destinations through the public facade
This commit is contained in:
@@ -149,6 +149,33 @@ have index zero. Explicit empty groups and `NoSource` consume no source ID.
|
||||
Byte, source, node, and glob-entry budgets are shared across the load, while
|
||||
the existing per-source and import-depth bounds still apply.
|
||||
|
||||
#### Input destinations
|
||||
|
||||
`Input.Destination` places the source's application mapping beneath a path
|
||||
relative to the configuration root. Its zero or empty value means root, so
|
||||
existing inputs keep their behavior. Main inputs and underlay inputs use the
|
||||
same destination model. Destination segments are literal mapping keys: dots,
|
||||
slashes, and numeric-looking text are not split or interpreted as sequence
|
||||
indexes. Explicit index segments and paths that introduce the reserved
|
||||
`configkit` or mapping-valued `extends` structure are invalid input options and
|
||||
produce a structured `LoadError` before source acquisition.
|
||||
|
||||
Source-root `configkit.imports` directives are processed before placement, and
|
||||
each imported application contribution inherits its input's destination,
|
||||
including transitive imports. A valid destination on `NoSource()` contributes
|
||||
nothing; an actual empty mapping materializes its destination containers. Once
|
||||
placed, contributions follow the same strict composition within a tier and
|
||||
recursive precedence behavior described above. A selected overlay and CLI
|
||||
overrides remain rooted at the application root and are not moved beneath the
|
||||
main input's destination.
|
||||
|
||||
`SourceInfo.Destination` reports the placement for each acquired input source,
|
||||
including imports. Placement does not change source IDs, acquisition identity,
|
||||
physical source locations, or passive resource contexts. Introduced ancestor
|
||||
mappings use the contributing document's root location as a source fallback;
|
||||
authored content retains its original source coordinates. Returned source
|
||||
records are detached copies.
|
||||
|
||||
The maintained [layered consumer example](consumers/README.md#native-filesystem-and-layered-input)
|
||||
shows a main host file, two underlay tiers, embedded defaults, a mapping source,
|
||||
and explicit resource access without a second configuration pass.
|
||||
|
||||
Reference in New Issue
Block a user