feat(component): add 'metadata' command listing overlay and group metadata#279
Draft
liunan-ms wants to merge 1 commit into
Draft
feat(component): add 'metadata' command listing overlay and group metadata#279liunan-ms wants to merge 1 commit into
liunan-ms wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new read-only azldev component metadata subcommand that surfaces documentation metadata for components, aggregating annotated metadata from both component overlays and explicitly-associated component groups. This fits into the existing component command suite as an inspection/reporting command intended for documentation and workflow visibility.
Changes:
- Introduces
component metadatacommand implementation with filtering (--category,--upstream-status) and source selection (--overlays,--groups). - Adds unit tests covering metadata collection/sorting/filtering behavior.
- Regenerates CLI reference docs and MCP snapshot, and cross-links the command from the overlays config documentation.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| scenario/snapshots/TestMCPServerMode_1.snap.json | Updates MCP tool snapshot to include the new component-metadata tool schema. |
| internal/app/azldev/cmds/component/metadata.go | Implements the new azldev component metadata subcommand and metadata collection/filtering/sorting logic. |
| internal/app/azldev/cmds/component/metadata_test.go | Adds tests for metadata listing behavior across overlays/groups and filter options. |
| internal/app/azldev/cmds/component/component.go | Wires the new metadata subcommand into the component command tree. |
| docs/user/reference/config/overlays.md | Adds a short doc section pointing users to azldev component metadata. |
| docs/user/reference/cli/azldev_component.md | Regenerated CLI index to include the new subcommand. |
| docs/user/reference/cli/azldev_component_metadata.md | New auto-generated CLI reference page for azldev component metadata. |
liunan-ms
force-pushed
the
liunan/component-metadata-cmd
branch
from
July 13, 2026 20:44
8679804 to
8a49b06
Compare
Comment on lines
+185
to
+187
| if options.Category != "" && !projectconfig.OverlayCategory(options.Category).IsValid() { | ||
| return nil, fmt.Errorf("%w: unknown overlay category %#q", azldev.ErrInvalidUsage, options.Category) | ||
| } |
Comment on lines
+190
to
+194
| return nil, fmt.Errorf( | ||
| "%w: unknown upstream-status value %#q; want 'upstreamed', 'upstreamable', "+ | ||
| "'needs-upstream-hook', 'inapplicable', or 'unknown'", | ||
| azldev.ErrInvalidUsage, options.UpstreamStatus, | ||
| ) |
…adata
Add 'azldev component metadata', which lists documentation metadata
from both a component's overlays and the component groups it
explicitly belongs to. Each row is tagged with its source ('overlay'
or 'group'). By default both sources are listed; --overlays or
--groups restricts output to one source.
Only entries carrying a [metadata] block are listed; unannotated
overlays and groups are excluded. Filters:
--category only entries whose metadata declares this category
--upstream-status only entries whose metadata declares this upstream
status (upstreamed, upstreamable, needs-upstream-hook,
inapplicable, or unknown)
The command is read-only and skips lock validation.
Regenerate CLI reference docs and the MCP snapshot; cross-link the
new command from the overlays config doc.
liunan-ms
force-pushed
the
liunan/component-metadata-cmd
branch
from
July 15, 2026 16:11
8a49b06 to
d1e6cf4
Compare
| ValidArgsFunction: components.GenerateComponentNameCompletions, | ||
| } | ||
|
|
||
| azldev.ExportAsMCPTool(cmd) |
Comment on lines
+185
to
+187
| if options.Category != "" && !projectconfig.OverlayCategory(options.Category).IsValid() { | ||
| return nil, fmt.Errorf("%w: unknown overlay category %#q", azldev.ErrInvalidUsage, options.Category) | ||
| } |
Comment on lines
+189
to
+195
| if options.UpstreamStatus != "" && !projectconfig.OverlayUpstreamStatus(options.UpstreamStatus).IsValid() { | ||
| return nil, fmt.Errorf( | ||
| "%w: unknown upstream-status value %#q; want 'upstreamed', 'upstreamable', "+ | ||
| "'needs-upstream-hook', 'inapplicable', or 'unknown'", | ||
| azldev.ErrInvalidUsage, options.UpstreamStatus, | ||
| ) | ||
| } |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add 'azldev component metadata', which lists documentation metadata from both a component's overlays and the component groups it explicitly belongs to. Each row is tagged with its source ('overlay' or 'group'). By default both sources are listed;
--overlaysor--groupsrestricts output to one source.Only entries carrying a [metadata] block are listed; unannotated overlays and groups are excluded. Filters:
The command is read-only and skips lock validation.
Regenerate CLI reference docs and the MCP snapshot; cross-link the
new command from the overlays config doc.