[WIP][not-for-review] azure.ai.agents: revamp next-step + doctor for unified azure.yaml#8605
Draft
antriksh30 wants to merge 1 commit into
Draft
[WIP][not-for-review] azure.ai.agents: revamp next-step + doctor for unified azure.yaml#8605antriksh30 wants to merge 1 commit into
antriksh30 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>
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.
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).