Skip to content

[WIP][not-for-review] azure.ai.agents: revamp next-step + doctor for unified azure.yaml#8605

Draft
antriksh30 wants to merge 1 commit into
mainfrom
antrikshjain/next-doctor-commands-updation
Draft

[WIP][not-for-review] azure.ai.agents: revamp next-step + doctor for unified azure.yaml#8605
antriksh30 wants to merge 1 commit into
mainfrom
antrikshjain/next-doctor-commands-updation

Conversation

@antriksh30

Copy link
Copy Markdown
Contributor

Summary

[WIP] [not-for-review] — This PR is not ready for review. It is staged ahead of the
unified-azure.yaml core changes and is intended to be finalized once that work lands.

Reworks the two azure.ai.agents extension features I previously shipped —
next-step suggestions (internal/cmd/nextstep/) and azd ai agent doctor
(internal/cmd/doctor/) — to source all state from the unified azure.yaml design
instead of the legacy three-file layout.

  • Before: azure.yaml (host: azure.ai.agent + a config: block) + agent.yaml
    (runtime def) + agent.manifest.yaml (templated resources).
  • After: a single azure.yaml service entry, host: microsoft.foundry, with
    deployments / connections / toolboxes / skills / routines / agents as
    top-level service properties (no config: indirection); per-agent runtime fields
    (project, docker, protocols, env, …) nest under agents[].

Design references: the product brief (preview repo simple/complex branches) and the
engineering spec #8590 (docs/specs/unify-azure-yaml/spec.md).

⚠️ Dependency / status

This change is gated on a separate workstream (core azure.yaml JSON-schema support for
host: microsoft.foundry, the new service-target registration, and the init rework). Until
that 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

  • New nextstep/foundry_config.go — the single decode seam. Decodes
    ServiceConfig.AdditionalProperties (forwarded by core over gRPC, no env-subst) into a
    local read-model, and resolves data-side $ref: file includes with the spec's
    overlay overrides (sibling keys win) and project: path rebasing (relative to the
    referenced file). ${VAR} / ${{...}} are preserved verbatim.
  • state.gocollectFoundry produces one ServiceState per agent (with Kind +
    owning ServiceName) plus aggregated model/toolbox/connection refs; host const →
    microsoft.foundry; an explicit endpoint: marks the project as present.
  • Deleted manifest.go (the agent.manifest.yaml walker) and dropped {{ }}
    placeholder handling
    entirely; missing-var detection now scans agents[].env.
  • resolver.go — removed the placeholder branch (switch 4 → 3 arms).

doctor

  • Host const → microsoft.foundry; removed the now-obsolete local.agent-yaml-valid
    check (structural validity is covered by local.azure-yaml); repointed the
    manual-env-vars skip-cascade to local.agent-service-detected.
  • Updated all user-facing strings/docs from agent.yaml / agent.manifest.yaml /
    azure.ai.agentazure.yaml / microsoft.foundry.

tests

  • Rewrote the affected tests against in-memory AdditionalProperties fixtures (preserving
    OpenAPI / Bicep-classification coverage); added decode-seam, protocol, env-ref, and
    resource-aggregation tests.

Scope

Touches only internal/cmd/nextstep/ and internal/cmd/doctor/ (+ their tests). Does
not touch init.go, listen.go, or service_target_agent.go — those belong to the
unification workstream.

Verification

  • go build ./...
  • go test ./internal/... ✅ (whole extension)
  • golangci-lint run (nextstep + doctor) ✅ 0 issues
  • cspell ✅ · gofmt -l clean · copyright headers present

Known true-ups (tracked in code comments)

  • isDeployed assumes a per-agent AGENT_<KEY>_VERSION env var — verify against the new
    service target's actual convention (TODO(unify true-up) in state.go).
  • Nested-$ref / instructions path rebasing intentionally out of scope (not consumed by
    nextstep).

…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>
@github-actions github-actions Bot added the ext-agents azure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions label Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ext-agents azure.ai.{agents,connections,inspector,projects,routines,skills,toolboxes} extensions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant