| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Okf.Cli
Description
Top-level CLI entry point for okf.
Synopsis
- data BundlesOptions = BundlesOptions {}
- data Command
- = Bundles BundlesOptions
- | Profiles ProfilesOptions
- | Validate ValidateOptions
- | Index IndexOptions
- | Log LogOptions
- | GraphCommand GraphOptions
- | ShowConcept ShowOptions
- | Trust TrustOptions
- | Sources SourcesOptions
- | Computations ComputationsOptions
- | Concepts ConceptsOptions
- | Id IdOptions
- | Alias !AliasCommand
- | Config ConfigCommand
- | Profile ProfileCommand
- | Kit KitCommand
- | AgentContext Bool
- | Assist AssistOptions
- | Completions CompletionsShell
- | Help HelpCommand
- data ComputationsOptions = ComputationsOptions {
- bundlePath :: !(Maybe FilePath)
- data ConceptsOptions = ConceptsOptions {
- bundlePath :: !(Maybe FilePath)
- conceptTypes :: ![Text]
- fieldFilters :: ![WhereCondition]
- presentFields :: ![FieldSelector]
- absentFields :: ![FieldSelector]
- showFields :: ![Text]
- sortKeys :: ![SortKey]
- profilePath :: !(Maybe FilePath)
- json :: !Bool
- data GraphOptions = GraphOptions {
- bundlePath :: !(Maybe FilePath)
- json :: !Bool
- data IdOptions = IdOptions {
- bundlePath :: !(Maybe FilePath)
- profilePath :: !FilePath
- idSub :: !IdSub
- data IdSub
- data IndexOptions = IndexOptions {
- bundlePath :: !(Maybe FilePath)
- write :: !Bool
- okfVersion :: !(Maybe Text)
- data ConfigCommand
- data LogAddOptions = LogAddOptions {}
- data LogOptions = LogOptions {
- bundlePath :: !(Maybe FilePath)
- checkStale :: !Bool
- sinceRef :: !(Maybe Text)
- logSub :: !LogSub
- data LogSub
- data Options = Options {}
- data ProfileCommand
- data ProfileDocumentOptions = ProfileDocumentOptions {
- registryRefs :: ![Text]
- export :: !(Maybe Text)
- profilePath :: !(Maybe FilePath)
- noLocal :: !Bool
- outputPath :: !(Maybe FilePath)
- write :: !Bool
- timestamp :: !(Maybe Text)
- generatedBy :: !(Maybe Text)
- generatedAt :: !(Maybe Text)
- okfVersion :: !(Maybe Text)
- data ProfileInitOptions = ProfileInitOptions {}
- data ProfileListOptions = ProfileListOptions {}
- data ProfileSourcesOptions = ProfileSourcesOptions {
- registryRefs :: ![Text]
- noLocal :: !Bool
- json :: !Bool
- checkLatest :: !Bool
- data ProfileSourceResolution = ProfileSourceResolution {}
- data ProfileSourceStatus
- = ProfileSourceLoaded !Int
- | ProfileSourceFailed !ProfileSourceLoadError
- data ProfileFreshness
- data ProfilesOptions = ProfilesOptions {}
- data ProfileSourceOrigin
- data ProfileShowOptions = ProfileShowOptions {}
- data ProfileSweepOptions = ProfileSweepOptions {}
- data ResolvedProfileSource = ResolvedProfileSource {
- resolvedSource :: !ProfileSource
- sourceOrigin :: !ProfileSourceOrigin
- data RegistryTableMode
- data ReleaseVersion = ReleaseVersion !Int !Int !Int
- data ShowOptions = ShowOptions {
- bundlePath :: !(Maybe FilePath)
- conceptIdText :: !(Maybe Text)
- profilePath :: !(Maybe FilePath)
- computationOnly :: !Bool
- conceptOrder :: !ConceptOrder
- data SourcesOptions = SourcesOptions {
- bundlePath :: !(Maybe FilePath)
- data TrustOptions = TrustOptions {
- bundlePath :: !(Maybe FilePath)
- data ValidateOptions = ValidateOptions {
- bundlePath :: !(Maybe FilePath)
- strictMode :: !Bool
- profilePath :: !(Maybe FilePath)
- pickProfile :: !Bool
- profileEnforce :: !Bool
- logEnforce :: !Bool
- bundleListJson :: [(FilePath, [Text])] -> Value
- computationReport :: [Concept] -> [Text]
- conceptReport :: [Text] -> [Concept] -> [Text]
- conceptReportJson :: [Concept] -> Value
- conceptsProfileDiagnostics :: CompiledProfile -> [Text] -> [WhereCondition] -> [FieldSelector] -> [FieldSelector] -> [SortKey] -> [Text]
- renderFilterProfileError :: FilterProfileError -> Text
- renderPredicateProfileError :: FilterProfileError -> Text
- observedIdPrefixes :: [Concept] -> [Text]
- parserInfo :: ParserInfo Options
- builtinCommands :: [Text]
- parseProfileRegistriesEnv :: Text -> Either Text [Text]
- parseReleaseVersionTag :: Text -> Maybe ReleaseVersion
- latestReleaseTag :: Text -> Maybe Text
- pinnedRegistryTag :: Text -> Maybe Text
- profileRegistriesEnvVar :: String
- profileRegistryEnvVar :: String
- registryListJson :: [ResolvedProfileSource] -> [SourcedProfile] -> Value
- profileSourcesJson :: [ProfileSourceResolution] -> ProfileFreshness -> Value
- profileDescriptorJson :: FilePath -> ProfileSpec -> Value
- resolveEffectiveProfileSources :: [Text] -> Bool -> IO [ResolvedProfileSource]
- resolveProfilePathWith :: FzfConfig -> Maybe FilePath -> IO FilePath
- resolveProfileSources :: [Text] -> IO [ResolvedProfileSource]
- renderProfileDetail :: Text -> ProfileSpec -> [Text]
- renderProfileViolation :: CompiledProfile -> [Concept] -> ProfileViolation -> Text
- renderRegistryTable :: RegistryTableMode -> [SourcedProfile] -> [Text]
- renderProfileSourceResolution :: [ProfileSourceResolution] -> ProfileFreshness -> Text
- runCli :: IO ()
- runCommand :: Command -> IO ()
- runLogAdd :: FilePath -> LogAddOptions -> IO ()
- selectSourcedProfile :: [SourcedProfile] -> Maybe Text -> Either Text SourcedProfile
Documentation
data BundlesOptions Source #
Constructors
| BundlesOptions | |
Instances
| Show BundlesOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> BundlesOptions -> ShowS # show :: BundlesOptions -> String # showList :: [BundlesOptions] -> ShowS # | |
| Eq BundlesOptions Source # | |
Defined in Okf.Cli Methods (==) :: BundlesOptions -> BundlesOptions -> Bool # (/=) :: BundlesOptions -> BundlesOptions -> Bool # | |
Constructors
data ComputationsOptions Source #
Constructors
| ComputationsOptions | |
Fields
| |
Instances
| Show ComputationsOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ComputationsOptions -> ShowS # show :: ComputationsOptions -> String # showList :: [ComputationsOptions] -> ShowS # | |
| Eq ComputationsOptions Source # | |
Defined in Okf.Cli Methods (==) :: ComputationsOptions -> ComputationsOptions -> Bool # (/=) :: ComputationsOptions -> ComputationsOptions -> Bool # | |
data ConceptsOptions Source #
Constructors
| ConceptsOptions | |
Fields
| |
Instances
| Show ConceptsOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ConceptsOptions -> ShowS # show :: ConceptsOptions -> String # showList :: [ConceptsOptions] -> ShowS # | |
| Eq ConceptsOptions Source # | |
Defined in Okf.Cli Methods (==) :: ConceptsOptions -> ConceptsOptions -> Bool # (/=) :: ConceptsOptions -> ConceptsOptions -> Bool # | |
data GraphOptions Source #
Constructors
| GraphOptions | |
Fields
| |
Instances
| Show GraphOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> GraphOptions -> ShowS # show :: GraphOptions -> String # showList :: [GraphOptions] -> ShowS # | |
| Eq GraphOptions Source # | |
Defined in Okf.Cli | |
Constructors
| IdOptions | |
Fields
| |
data IndexOptions Source #
Constructors
| IndexOptions | |
Fields
| |
Instances
| Show IndexOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> IndexOptions -> ShowS # show :: IndexOptions -> String # showList :: [IndexOptions] -> ShowS # | |
| Eq IndexOptions Source # | |
Defined in Okf.Cli | |
data ConfigCommand Source #
Constructors
| ConfigShow | |
| ConfigPath | |
| ConfigInit !Bool | |
| ConfigAgent |
Instances
| Show ConfigCommand Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ConfigCommand -> ShowS # show :: ConfigCommand -> String # showList :: [ConfigCommand] -> ShowS # | |
| Eq ConfigCommand Source # | |
Defined in Okf.Cli Methods (==) :: ConfigCommand -> ConfigCommand -> Bool # (/=) :: ConfigCommand -> ConfigCommand -> Bool # | |
data LogAddOptions Source #
Constructors
| LogAddOptions | |
Instances
| Show LogAddOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> LogAddOptions -> ShowS # show :: LogAddOptions -> String # showList :: [LogAddOptions] -> ShowS # | |
| Eq LogAddOptions Source # | |
Defined in Okf.Cli Methods (==) :: LogAddOptions -> LogAddOptions -> Bool # (/=) :: LogAddOptions -> LogAddOptions -> Bool # | |
data LogOptions Source #
Constructors
| LogOptions | |
Fields
| |
Instances
| Show LogOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> LogOptions -> ShowS # show :: LogOptions -> String # showList :: [LogOptions] -> ShowS # | |
| Eq LogOptions Source # | |
Defined in Okf.Cli | |
Constructors
| LogPreview | |
| LogAdd LogAddOptions |
data ProfileCommand Source #
Constructors
Instances
| Show ProfileCommand Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileCommand -> ShowS # show :: ProfileCommand -> String # showList :: [ProfileCommand] -> ShowS # | |
| Eq ProfileCommand Source # | |
Defined in Okf.Cli Methods (==) :: ProfileCommand -> ProfileCommand -> Bool # (/=) :: ProfileCommand -> ProfileCommand -> Bool # | |
data ProfileDocumentOptions Source #
Constructors
| ProfileDocumentOptions | |
Fields
| |
Instances
| Show ProfileDocumentOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileDocumentOptions -> ShowS # show :: ProfileDocumentOptions -> String # showList :: [ProfileDocumentOptions] -> ShowS # | |
| Eq ProfileDocumentOptions Source # | |
Defined in Okf.Cli Methods (==) :: ProfileDocumentOptions -> ProfileDocumentOptions -> Bool # (/=) :: ProfileDocumentOptions -> ProfileDocumentOptions -> Bool # | |
data ProfileInitOptions Source #
Constructors
| ProfileInitOptions | |
Instances
| Show ProfileInitOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileInitOptions -> ShowS # show :: ProfileInitOptions -> String # showList :: [ProfileInitOptions] -> ShowS # | |
| Eq ProfileInitOptions Source # | |
Defined in Okf.Cli Methods (==) :: ProfileInitOptions -> ProfileInitOptions -> Bool # (/=) :: ProfileInitOptions -> ProfileInitOptions -> Bool # | |
data ProfileListOptions Source #
Constructors
| ProfileListOptions | |
Instances
| Show ProfileListOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileListOptions -> ShowS # show :: ProfileListOptions -> String # showList :: [ProfileListOptions] -> ShowS # | |
| Eq ProfileListOptions Source # | |
Defined in Okf.Cli Methods (==) :: ProfileListOptions -> ProfileListOptions -> Bool # (/=) :: ProfileListOptions -> ProfileListOptions -> Bool # | |
data ProfileSourcesOptions Source #
Constructors
| ProfileSourcesOptions | |
Fields
| |
Instances
| Show ProfileSourcesOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileSourcesOptions -> ShowS # show :: ProfileSourcesOptions -> String # showList :: [ProfileSourcesOptions] -> ShowS # | |
| Eq ProfileSourcesOptions Source # | |
Defined in Okf.Cli Methods (==) :: ProfileSourcesOptions -> ProfileSourcesOptions -> Bool # (/=) :: ProfileSourcesOptions -> ProfileSourcesOptions -> Bool # | |
data ProfileSourceResolution Source #
Constructors
| ProfileSourceResolution | |
Instances
| Show ProfileSourceResolution Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileSourceResolution -> ShowS # show :: ProfileSourceResolution -> String # showList :: [ProfileSourceResolution] -> ShowS # | |
| Eq ProfileSourceResolution Source # | |
Defined in Okf.Cli Methods (==) :: ProfileSourceResolution -> ProfileSourceResolution -> Bool # (/=) :: ProfileSourceResolution -> ProfileSourceResolution -> Bool # | |
data ProfileSourceStatus Source #
Constructors
| ProfileSourceLoaded !Int | |
| ProfileSourceFailed !ProfileSourceLoadError |
Instances
| Show ProfileSourceStatus Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileSourceStatus -> ShowS # show :: ProfileSourceStatus -> String # showList :: [ProfileSourceStatus] -> ShowS # | |
| Eq ProfileSourceStatus Source # | |
Defined in Okf.Cli Methods (==) :: ProfileSourceStatus -> ProfileSourceStatus -> Bool # (/=) :: ProfileSourceStatus -> ProfileSourceStatus -> Bool # | |
data ProfileFreshness Source #
Constructors
| FreshnessNotChecked | |
| FreshnessCurrent !Text | |
| FreshnessOutdated !Text !Text | |
| FreshnessUnavailable !Text |
Instances
| Show ProfileFreshness Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileFreshness -> ShowS # show :: ProfileFreshness -> String # showList :: [ProfileFreshness] -> ShowS # | |
| Eq ProfileFreshness Source # | |
Defined in Okf.Cli Methods (==) :: ProfileFreshness -> ProfileFreshness -> Bool # (/=) :: ProfileFreshness -> ProfileFreshness -> Bool # | |
data ProfilesOptions Source #
Constructors
| ProfilesOptions | |
Instances
| Show ProfilesOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfilesOptions -> ShowS # show :: ProfilesOptions -> String # showList :: [ProfilesOptions] -> ShowS # | |
| Eq ProfilesOptions Source # | |
Defined in Okf.Cli Methods (==) :: ProfilesOptions -> ProfilesOptions -> Bool # (/=) :: ProfilesOptions -> ProfilesOptions -> Bool # | |
data ProfileSourceOrigin Source #
The winning precedence layer for a resolved profile source. This travels with the source so inspection never has to reconstruct resolution later.
Constructors
| RegistryFlagOrigin | |
| RegistriesEnvironmentOrigin | |
| LegacyRegistryEnvironmentOrigin | |
| ProfileConfigOrigin !FilePath | |
| BuiltInRegistryOrigin | |
| ProfileDiscoveryOrigin ![FilePath] |
Instances
| Show ProfileSourceOrigin Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileSourceOrigin -> ShowS # show :: ProfileSourceOrigin -> String # showList :: [ProfileSourceOrigin] -> ShowS # | |
| Eq ProfileSourceOrigin Source # | |
Defined in Okf.Cli Methods (==) :: ProfileSourceOrigin -> ProfileSourceOrigin -> Bool # (/=) :: ProfileSourceOrigin -> ProfileSourceOrigin -> Bool # | |
data ProfileShowOptions Source #
Constructors
| ProfileShowOptions | |
Instances
| Show ProfileShowOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ProfileShowOptions -> ShowS # show :: ProfileShowOptions -> String # showList :: [ProfileShowOptions] -> ShowS # | |
| Eq ProfileShowOptions Source # | |
Defined in Okf.Cli Methods (==) :: ProfileShowOptions -> ProfileShowOptions -> Bool # (/=) :: ProfileShowOptions -> ProfileShowOptions -> Bool # | |
data ProfileSweepOptions Source #
Constructors
| ProfileSweepOptions | |
Instances
data ResolvedProfileSource Source #
Constructors
| ResolvedProfileSource | |
Fields
| |
Instances
| Show ResolvedProfileSource Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ResolvedProfileSource -> ShowS # show :: ResolvedProfileSource -> String # showList :: [ResolvedProfileSource] -> ShowS # | |
| Eq ResolvedProfileSource Source # | |
Defined in Okf.Cli Methods (==) :: ResolvedProfileSource -> ResolvedProfileSource -> Bool # (/=) :: ResolvedProfileSource -> ResolvedProfileSource -> Bool # | |
data RegistryTableMode Source #
Constructors
| CompactTable | |
| WideTable |
Instances
| Show RegistryTableMode Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> RegistryTableMode -> ShowS # show :: RegistryTableMode -> String # showList :: [RegistryTableMode] -> ShowS # | |
| Eq RegistryTableMode Source # | |
Defined in Okf.Cli Methods (==) :: RegistryTableMode -> RegistryTableMode -> Bool # (/=) :: RegistryTableMode -> RegistryTableMode -> Bool # | |
data ReleaseVersion Source #
Constructors
| ReleaseVersion !Int !Int !Int |
Instances
| Show ReleaseVersion Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ReleaseVersion -> ShowS # show :: ReleaseVersion -> String # showList :: [ReleaseVersion] -> ShowS # | |
| Eq ReleaseVersion Source # | |
Defined in Okf.Cli Methods (==) :: ReleaseVersion -> ReleaseVersion -> Bool # (/=) :: ReleaseVersion -> ReleaseVersion -> Bool # | |
| Ord ReleaseVersion Source # | |
Defined in Okf.Cli Methods compare :: ReleaseVersion -> ReleaseVersion -> Ordering # (<) :: ReleaseVersion -> ReleaseVersion -> Bool # (<=) :: ReleaseVersion -> ReleaseVersion -> Bool # (>) :: ReleaseVersion -> ReleaseVersion -> Bool # (>=) :: ReleaseVersion -> ReleaseVersion -> Bool # max :: ReleaseVersion -> ReleaseVersion -> ReleaseVersion # min :: ReleaseVersion -> ReleaseVersion -> ReleaseVersion # | |
data ShowOptions Source #
Constructors
| ShowOptions | |
Fields
| |
Instances
| Show ShowOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ShowOptions -> ShowS # show :: ShowOptions -> String # showList :: [ShowOptions] -> ShowS # | |
| Eq ShowOptions Source # | |
Defined in Okf.Cli | |
data SourcesOptions Source #
Constructors
| SourcesOptions | |
Fields
| |
Instances
| Show SourcesOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> SourcesOptions -> ShowS # show :: SourcesOptions -> String # showList :: [SourcesOptions] -> ShowS # | |
| Eq SourcesOptions Source # | |
Defined in Okf.Cli Methods (==) :: SourcesOptions -> SourcesOptions -> Bool # (/=) :: SourcesOptions -> SourcesOptions -> Bool # | |
data TrustOptions Source #
Constructors
| TrustOptions | |
Fields
| |
Instances
| Show TrustOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> TrustOptions -> ShowS # show :: TrustOptions -> String # showList :: [TrustOptions] -> ShowS # | |
| Eq TrustOptions Source # | |
Defined in Okf.Cli | |
data ValidateOptions Source #
Constructors
| ValidateOptions | |
Fields
| |
Instances
| Show ValidateOptions Source # | |
Defined in Okf.Cli Methods showsPrec :: Int -> ValidateOptions -> ShowS # show :: ValidateOptions -> String # showList :: [ValidateOptions] -> ShowS # | |
| Eq ValidateOptions Source # | |
Defined in Okf.Cli Methods (==) :: ValidateOptions -> ValidateOptions -> Bool # (/=) :: ValidateOptions -> ValidateOptions -> Bool # | |
bundleListJson :: [(FilePath, [Text])] -> Value Source #
JSON wire format for okf bundles --json. An empty prefix list means no
evidence was observed, so the optional field is absent rather than empty.
computationReport :: [Concept] -> [Text] Source #
The lines okf computations prints, as data. Pure and separate from
runComputations so a test can assert the whole report rather than only the
accessors behind it; renderProfileDetail is exported for the same reason.
Concepts arrive in walkBundle order and keep it. Column widths are computed
over the selected rows only, so one unrelated long concept ID elsewhere in the
bundle cannot pad this report.
conceptReport :: [Text] -> [Concept] -> [Text] Source #
The lines okf concepts prints, as data: concept ID, type, one column per
key requested with --show, and title last. The --show option affects
this text report only; JSON output always carries complete stored
frontmatter. Pure and separate from runConcepts so a test can assert the
whole report rather than only the accessors behind it, as computationReport
and renderProfileDetail already are.
The three default columns are the ones
conceptCandidates shows in the interactive concept
picker, so the two listings agree.
title comes last and is never padded, so a long title cannot push anything
off the right edge and a concept with no title simply ends the line. Column
widths are computed over the rows actually printed, so one unrelated long
concept ID elsewhere in the bundle cannot pad a filtered listing.
conceptReportJson :: [Concept] -> Value Source #
The rows okf concepts --json emits.
Each row is the complete stored frontmatter object. File-derived identity,
source paths, Markdown bodies, derived readings, and a CLI-owned envelope are
deliberately absent. Filters choose the rows before this renderer runs, and
--show is not an input because it controls text columns only.
conceptsProfileDiagnostics :: CompiledProfile -> [Text] -> [WhereCondition] -> [FieldSelector] -> [FieldSelector] -> [SortKey] -> [Text] Source #
Every profile diagnostic for an okf concepts command line, in a stable
order: the legacy filters first — --type, legacy --where equalities,
--has, --missing, as they always have been — then each explicit
condition in flag order, then each --sort key. A predicate or sort-key
error repeated across flags is reported once.
A sort key is checked for declaration only, as has(KEY) would be: there is
no value to check. It is worth checking at all because a misspelled sort key
leaves the listing in concept-ID order, which looks entirely plausible.
The two kinds render differently on purpose. A legacy equality outside a
vocabulary really can match nothing, and its message has always said so. A
predicate's out-of-vocabulary value may sit under != or not, where the
condition can still match plenty; it is still a typo worth stopping for, but
"no concept can match" would be false.
renderFilterProfileError :: FilterProfileError -> Text Source #
Why a profile says a filter can never select anything.
The message quotes the filter, status=acepted, and not the flag the user
typed. --type Reqest desugars into a filter on the type key before any
checking happens, so by the time an error exists there is no flag left to
quote and guessing one would sometimes name a flag the user did not use.
renderPredicateProfileError :: FilterProfileError -> Text Source #
Why a profile rejects an explicit --where condition. Neutral about
matching, since the offending value may be one the condition excludes.
observedIdPrefixes :: [Concept] -> [Text] Source #
Sorted, duplicate-free strict handle prefixes observed anywhere in the top-level string frontmatter of the supplied concepts.
builtinCommands :: [Text] Source #
parseProfileRegistriesEnv :: Text -> Either Text [Text] Source #
Decode the plural environment value. Aeson decodes directly to [Text],
so a non-array or non-string member is rejected rather than coerced. Blank
elements are discarded and exact duplicates keep their first occurrence.
profileRegistriesEnvVar :: String Source #
Plural environment override. JSON is used because registry references may themselves contain colons in URLs and integrity hashes.
profileRegistryEnvVar :: String Source #
Legacy singular environment override for the registry okf profile reads.
registryListJson :: [ResolvedProfileSource] -> [SourcedProfile] -> Value Source #
profileDescriptorJson :: FilePath -> ProfileSpec -> Value Source #
JSON wire format for one discovered descriptor. Optional prose is omitted rather than rendered as null, matching the bundle-listing convention.
resolveEffectiveProfileSources :: [Text] -> Bool -> IO [ResolvedProfileSource] Source #
Resolve the winning registry layer and append network-silent local descriptors unless the caller explicitly requested registry-only behavior.
resolveProfilePathWith :: FzfConfig -> Maybe FilePath -> IO FilePath Source #
Resolve a descriptor with an already-detected picker configuration. This is exported so tests can prove the explicit branch ignores availability.
resolveProfileSources :: [Text] -> IO [ResolvedProfileSource] Source #
Profile source precedence: repeated --registry flags, then the plural
JSON environment value, then the legacy singular environment value, then the
effective configuration. Only the winning layer contributes sources.
Configuration is read only when needed, so a broken file cannot stop an
explicit invocation.
renderProfileDetail :: Text -> ProfileSpec -> [Text] Source #
One profile's complete rule set. Every optional field prints as (none)
rather than being omitted, so the output shape does not change between
profiles and stays reliable to eyeball or grep. Type rules print in the order
the profile declares them, since that order is the author's.
renderProfileViolation :: CompiledProfile -> [Concept] -> ProfileViolation -> Text Source #
One deviation as one line. The ProfileSpec is here only so a missing
required field can carry the profile's own explanation of what that field is
for; every other case ignores it.
Exported so a test can assert a whole diagnostic line rather than only the
accessors behind it, as computationReport and renderProfileDetail already
are. The constructors that quote a frontmatter value back to the author ignore
both the CompiledProfile and the concept list, so such a test can pass any
compiled profile and an empty list.
renderRegistryTable :: RegistryTableMode -> [SourcedProfile] -> [Text] Source #
A deterministic two-line row per profile. Compact mode uses fixed column budgets whose separators sum to 100 Unicode code points, then caps the indented description to 98. Wide mode derives widths from the full identity values and keeps the complete normalized description. Unicode code points are intentionally used instead of terminal display cells so rendering stays pure and terminal-independent; combining and double-width glyphs may not visually occupy exactly one cell.
renderProfileSourceResolution :: [ProfileSourceResolution] -> ProfileFreshness -> Text Source #
The source inspection table and its precedence legend are pure so the command can be pinned without evaluating Dhall or consulting the network.
runCommand :: Command -> IO () Source #