Expose configuration metadata and findings
This commit is contained in:
@@ -83,6 +83,29 @@ type View struct {
|
||||
Effective EffectiveWriter
|
||||
Sources SourceReader
|
||||
Explanation ExplanationReader
|
||||
// Metadata supplies native configuration path metadata when available.
|
||||
Metadata *configkit.Metadata
|
||||
// Findings supplies native diagnostics and their ordinary presentations.
|
||||
// Nil means unavailable; a nonnil value may contain no records.
|
||||
Findings *Findings
|
||||
}
|
||||
|
||||
// Findings associates native diagnostic records with their ordinary messages.
|
||||
type Findings struct {
|
||||
// Records contains the native diagnostic records, which may be empty.
|
||||
Records []configkit.Diagnostic
|
||||
// Messages contains ordinary presentations associated with Records.
|
||||
Messages []commandkit.Diagnostic
|
||||
}
|
||||
|
||||
// ScopeFeatures describes optional modes within configuration operations.
|
||||
type ScopeFeatures struct {
|
||||
// PathDiscovery indicates support for metadata-backed path discovery.
|
||||
PathDiscovery bool
|
||||
// PathShow indicates support for displaying a selected effective path.
|
||||
PathShow bool
|
||||
// Overrides indicates that the loader accepts explicit configuration overrides.
|
||||
Overrides bool
|
||||
}
|
||||
|
||||
// Scope declares the operations and providers for one named configuration.
|
||||
@@ -97,6 +120,8 @@ type Scope[I, S any] struct {
|
||||
Summary string
|
||||
// Operations selects the standard handlers exposed for this scope.
|
||||
Operations []Operation
|
||||
// Features describes optional modes supported by this scope.
|
||||
Features ScopeFeatures
|
||||
// Acquire loads the selected configuration for one ordinary inspection
|
||||
// invocation. It returns independent diagnostics and terminal context
|
||||
// separately from the native value and optional operation error.
|
||||
|
||||
Reference in New Issue
Block a user