[WIP][not-for-review] azure.ai.agents: revamp next-step + doctor for unified azure.yaml#8605
[WIP][not-for-review] azure.ai.agents: revamp next-step + doctor for unified azure.yaml#8605antriksh30 wants to merge 1 commit into
Conversation
…dry) Rework the next-step suggestions and 'azd ai agent doctor' features in the azure.ai.agents extension to source all state from the unified azure.yaml design (host: microsoft.foundry, with deployments/connections/toolboxes/skills/routines/agents as top-level service properties) instead of the legacy 3-file layout (azure.yaml + agent.yaml + agent.manifest.yaml). - Add nextstep/foundry_config.go: single decode seam over ServiceConfig.AdditionalProperties with endpoint, uniform \ includes, overlay overrides, and project path rebasing (per spec PR #8590). - Re-source nextstep state per-agent; delete the agent.manifest.yaml walker; drop {{ }} placeholder handling; scan agents[].env for missing vars. - Revamp doctor checks: host -> microsoft.foundry; remove the obsolete agent.yaml-valid check; update messages/cascades. - Rewrite tests against in-memory AdditionalProperties fixtures. Build/lint/cspell/tests all green. Gated on the core schema + microsoft.foundry service-target landing (separate workstream). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Hi @@antriksh30. Thank you for your interest in helping to improve the Azure Developer CLI experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days. |
|
Hi @@antriksh30. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing "/reopen" if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the "no-recent-activity" label; otherwise, this is likely to be closed again with the next cleanup pass. |
Summary
Reworks the two
azure.ai.agentsextension features I previously shipped —next-step suggestions (
internal/cmd/nextstep/) andazd ai agent doctor(
internal/cmd/doctor/) — to source all state from the unifiedazure.yamldesigninstead of the legacy three-file layout.
azure.yaml(host: azure.ai.agent+ aconfig:block) +agent.yaml(runtime def) +
agent.manifest.yaml(templated resources).azure.yamlservice entry,host: microsoft.foundry, withdeployments/connections/toolboxes/skills/routines/agentsastop-level service properties (no
config:indirection); per-agent runtime fields(
project,docker,protocols,env, …) nest underagents[].Design references: the product brief (preview repo
simple/complexbranches) and theengineering spec #8590 (
docs/specs/unify-azure-yaml/spec.md).This change is gated on a separate workstream (core
azure.yamlJSON-schema support forhost: microsoft.foundry, the new service-target registration, and theinitrework). Untilthat lands, these two features will be no-ops for existing (old-layout) projects — which
is expected and accepted. The code is structured so field-shape true-ups against the final
implementation are localized to one decode seam.
What changed
nextstep
nextstep/foundry_config.go— the single decode seam. DecodesServiceConfig.AdditionalProperties(forwarded by core over gRPC, no env-subst) into alocal read-model, and resolves data-side
$ref:file includes with the spec'soverlay overrides (sibling keys win) and
project:path rebasing (relative to thereferenced file).
${VAR}/${{...}}are preserved verbatim.state.go—collectFoundryproduces oneServiceStateper agent (withKind+owning
ServiceName) plus aggregated model/toolbox/connection refs; host const →microsoft.foundry; an explicitendpoint:marks the project as present.manifest.go(theagent.manifest.yamlwalker) and dropped{{ }}placeholder handling entirely; missing-var detection now scans
agents[].env.resolver.go— removed the placeholder branch (switch 4 → 3 arms).doctor
microsoft.foundry; removed the now-obsoletelocal.agent-yaml-validcheck (structural validity is covered by
local.azure-yaml); repointed themanual-env-varsskip-cascade tolocal.agent-service-detected.agent.yaml/agent.manifest.yaml/azure.ai.agent→azure.yaml/microsoft.foundry.tests
AdditionalPropertiesfixtures (preservingOpenAPI / Bicep-classification coverage); added decode-seam, protocol, env-ref, and
resource-aggregation tests.
Scope
Touches only
internal/cmd/nextstep/andinternal/cmd/doctor/(+ their tests). Doesnot touch
init.go,listen.go, orservice_target_agent.go— those belong to theunification workstream.
Verification
go build ./...✅go test ./internal/...✅ (whole extension)golangci-lint run(nextstep + doctor) ✅ 0 issuescspell✅ ·gofmt -lclean · copyright headers presentKnown true-ups (tracked in code comments)
isDeployedassumes a per-agentAGENT_<KEY>_VERSIONenv var — verify against the newservice target's actual convention (
TODO(unify true-up)instate.go).$ref/instructionspath rebasing intentionally out of scope (not consumed bynextstep).