feat: unified structured output (RFC 0031) and Tier 1 provider expansion (RFC 0030) #567
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.
Summary
This PR implements two RFCs plus a robust mirror/download system:
RFC 0031: Unified Structured Output
OutputFormatenum (Text/Json/Toon) replacing previous fragmented enums (Table/Json/YamlandTable/Json/Plain)CommandOutputtrait — commands implementSerialize+render_text()for format-agnostic outputOutputRenderer— selects between text/JSON/TOON based on global flags--jsonand--formatflags on theClistruct with env var support (VX_OUTPUT,VX_OUTPUT_JSON)OutputModewiring — fixedConsoleBuilderwhich acceptedoutput_modebut discarded it; addedoutput_modefield toShellCommandOutputtrait with structuredSearchOutput/SearchResultGlobalListFormat— renamed local enum to avoid conflict with unifiedOutputFormatRFC 0030: Provider Expansion (Tier 1)
6 new providers added:
Region-Aware Mirror Support
Added robust mirror/proxy system for downloads in China region:
Architecture:
region.rsmodule consolidating region detection logic (replaces duplicated code in http_client.rs)VX_MIRROR_REGIONenv →VX_CDNenv → CI detection → locale/timezone → default Globalmirror_urls(),download_url_for_mirror(),build_download_url_chain()ManifestDrivenRuntimewired to load[[runtimes.mirrors]]from provider.tomlMirror support for 8 providers:
npmmirror.com/mirrors/nodemirrors.ustc.edu.cn/nodenpmmirror.com/mirrors/pnpmnpmmirror.com/mirrors/yarngolang.google.cn/dlmirrors.ustc.edu.cn/golangcdn.npmmirror.com/binaries/python-build-standalonemirrors.ustc.edu.cn/rust-static/rustup/distmirrors.tuna.tsinghua.edu.cn/rustup/distghgo.xyz(GitHub Release proxy)npmmirror.com/mirrors/bunSKILL.md Updates
Files Changed
region.rsshared module +region_tests.rsTesting
cargo check --workspace✅cargo clippy --workspace✅ (zero new warnings)