Repository navigation
feat: add azd ai agent config list-alpha - #10657
Hui Miao (huimiu) wants to merge 15 commits into
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). 25 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
🟡 Changes recommended
Strengthen JSON error-field assertions and complete the scenario command and help tag taxonomy.
1 open issue
What changed in this PR
Adds azd ai agent config list-alpha to display agent alpha-feature status in text or JSON, with environment support and error reporting.
Changes:
- Adds the
config list-alphacommand and JSON output support. - Adds tests, help snapshots, documentation, and Tier 0 coverage.
- Updates root command registration and scenario expectations.
| File | Description |
|---|---|
cli/azd/extensions/azure.ai.agents/tests/cli-interactive-tester-scenarios/tier0/0.32-config-list-alpha.yaml |
Adds Tier 0 scenario coverage. |
cli/azd/extensions/azure.ai.agents/tests/cli-interactive-tester-scenarios/tier0/0.02-help-root.yaml |
Updates root help expectations. |
cli/azd/extensions/azure.ai.agents/tests/cli-interactive-tester-scenarios/README.md |
Documents scenario tags and registration. |
cli/azd/extensions/azure.ai.agents/README.md |
Documents feature status inspection. |
cli/azd/extensions/azure.ai.agents/internal/cmd/testdata/TestAgentHelpPreviewsOff-root.snap |
Updates root help snapshot. |
cli/azd/extensions/azure.ai.agents/internal/cmd/testdata/TestAgentHelp-root.snap |
Updates root help snapshot. |
cli/azd/extensions/azure.ai.agents/internal/cmd/testdata/TestAgentHelp-config.snap |
Adds config help snapshot. |
cli/azd/extensions/azure.ai.agents/internal/cmd/testdata/TestAgentHelp-config_list-alpha.snap |
Adds list-alpha help snapshot. |
cli/azd/extensions/azure.ai.agents/internal/cmd/root.go |
Registers the config command. |
cli/azd/extensions/azure.ai.agents/internal/cmd/root_test.go |
Tests command visibility. |
cli/azd/extensions/azure.ai.agents/internal/cmd/json_output.go |
Supports writer-based JSON output. |
cli/azd/extensions/azure.ai.agents/internal/cmd/config.go |
Implements configuration listing and formatting. |
cli/azd/extensions/azure.ai.agents/internal/cmd/config_test.go |
Tests listing behavior and output formats. |
cli/azd/extensions/azure.ai.agents/docs/specs/preview-feature-flags.md |
Specifies command behavior and coverage. |
Review effort: Lite
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
73c9077 to
4cc5435
Compare
Rebased onto the updated hosted agent feature flag branch. Squashes: - feat: add azd ai agent feature list - refactor: rename feature list to config list-alpha
Include the harness type TrimSpace fix from hui/foundry-feature-flags-hosted-agent.
azure.ai.agents PR buildNote This is an unsigned development build. Install it only if you trust this PR. Install the extension: azd ext install "https://azuresdkartifacts.z5.web.core.windows.net/azd/extensions/pr/10657/azure-ai-agents.zip"
|
John Miller (therealjohn)
left a comment
There was a problem hiding this comment.
This is fine since we cant hook into the core config command - but we could just use env vars for now instead. What are the risks with just doing that?
No risk, so I'll close this PR and use env vars for now |



Fixes #10659
Summary
Adds
azd ai agent config list-alpha, modeled onazd config list-alpha. It lists each agent alpha feature from the registry with its name, description,OnorOffstatus for the selected environment, and env var.The extension had no
configgroup, so this adds one with justlist-alphato match the core command path.Stacked on #10640.
Behavior
-e/--environment. Without it, uses the default environment, or skips environment values if there's no project. An explicit empty value is rejected before anything is read.--output text(default) prints one block per feature in the core layout (Name,Description,Status) plusEnvironment variable.--output jsonprints{"features":[{"name","description","status","envVar","error"}]}.Unknownwith anErrorline (text) or anerrorfield (JSON). All features are still listed, then the command exits with an error.Changes
internal/cmd/config.go:configgroup andlist-alphasubcommand.internal/cmd/json_output.go:writeJSONtakes a writer.emitJSONis unchanged.featurecommand.--environmentrejection.config,config list-alpha, and the root command list.0.32-config-list-alpha.yaml. The scenario copies the real azd config into a scratchAZD_CONFIG_DIR, removes its alpha keys, and deletes the copy in teardown, so the real config is never changed.Validation
go build ./...,go vet ./..., andgo test ./...pass.gofmtis clean.golangci-lintwith the repo config reports 0 issues. cSpell passes on touched files.E2E
azd and the extension were built from this PR (
b52dddb2f). The extension binary was swapped into the local install. Root help was rechecked at21d001a69after merging the latest #10640. Rows with<id>or<ENVVAR>ran for all three features. The project had two envs,dev(default) andother. Each run started from a fresh user config. The last three rows ran at7cf859518after the review fixes.config, nofeatureconfiglisted, nofeaturefeature listconfig list-alpha, fresh configOffOffconfig list-alpha -o json, fresh configfeaturesarray withname,description,status,envVarazd config set alpha.<id> onOnin text and JSONOnazd config unset alpha.<id>OffOffazd env set <ENVVAR> truein the selected envOnby default,Offwith-e otherazd env set <ENVVAR> true -e otherOnwith-e other,Offby default<ENVVAR>=trueOnOnazd config set alpha.<id> trueOffOffazd config set alpha.all onOffOffazd env set <ENVVAR> yesor processyesOffOffOffOffconfig list-alpha -e nosuchenvUnknownwith its error, then exit 1Unknownwith the environment error, exit 1 with a one line countconfig list-alpha -o rawconfig list-alpha -e ""and--environment "", opt-in only in the default envOn0.32hooks withalpha.all onand voice on in the real configOff, real config unchanged, copy removedAZD_FOUNDRY_EXT_ENABLE_AGENTS_VOICE=trueOnOnDeploy, invoke, and gate results for the stack are in #10640. This PR doesn't change them.