-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add fluent hidden options #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
autocarl
wants to merge
3
commits into
yllibed:main
Choose a base branch
from
autocarl:agent/issue-76-hidden-options
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Changelog | ||
|
|
||
| Notable consumer-facing changes to the Repl packages. Versions are assigned automatically by | ||
| Nerdbank.GitVersioning at pack time; this file groups changes by theme instead of by release. | ||
|
|
||
| ## Unreleased | ||
|
|
||
| ### Added — option visibility | ||
|
|
||
| - `.Hidden(bool isHidden = true)` on the option builder (`WithOption(name, option => option.Hidden())`) | ||
| hides an option's canonical token, aliases, description, default, and value candidates from help, | ||
| generated documentation, interactive/shell completion, and MCP tool schemas. The option remains a | ||
| fully parsable, invocable part of the command line — hiding is a discovery filter, not access | ||
| control. Available for direct command-handler parameters, options-group properties, manually | ||
| registered global options (`ParsingOptions.GlobalOption(name).Hidden()`), and typed global options. | ||
| - `.HiddenAlias(alias, isHidden = true)` and `[ReplOption(HiddenAliases = [...])]` mark specific | ||
| legacy/deprecated token spellings as parser-only: the canonical token and any current aliases stay | ||
| discoverable, while the hidden alias keeps binding from the CLI/REPL for backward compatibility. | ||
| - `doc export` (and `docs <command path>`) reports `isHidden` / `isAutomationHidden` per option so an | ||
| app author can inventory what a given command hides. Aggregate documentation (no target path) and | ||
| MCP's `tools/list` always omit hidden options entirely — see `docs/commands.md` for the full | ||
| visibility matrix. | ||
| - A hidden option must remain omittable for every provider that can build a discovery surface. | ||
| Hiding a required options-group property fails immediately at `Map` time. Hiding a required direct | ||
| handler parameter defers that check to the first time discovery runs against a real service | ||
| provider (aggregate documentation build or MCP startup), since a DI/synthesized-progress fallback | ||
| is only knowable once one exists — see the "Provider-aware requiredness" section of | ||
| `docs/commands.md`. | ||
|
|
||
| ### Changed — breaking | ||
|
|
||
| - `WithOption(name, configure)` is now the only fluent entry point for configuring an existing | ||
| option's metadata (visibility included). This lands within the same change that introduces it — | ||
| no previously published `Option(...)` API is removed by this release. | ||
|
|
||
| ### Compatibility notes | ||
|
|
||
| - `doc export --json` (and other structured documentation exports) now unconditionally include the | ||
| `isHidden` and `isAutomationHidden` fields on every option. A consumer validating that output | ||
| against a closed schema (`additionalProperties: false`) will need to allow these two additive | ||
| fields. | ||
| - The historical six-parameter `ParsingOptions.AddGlobalOptionCore` descriptor is preserved as a | ||
| distinct overload (not folded into a defaulted parameter) so an already-compiled `Repl.Defaults` | ||
| binary continues to work against a newer `Repl.Core`. The reverse is not guaranteed: this release's | ||
| `Repl.Defaults` calls APIs that only exist in this release's `Repl.Core`, so upgrading only one of | ||
| the two packages independently is not supported — upgrade them together. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.