Skip to content

Fix duplicate agent registration; add preview nudge; bump to GA 1.1#398

Merged
sellakumaran merged 2 commits intomainfrom
users/sellak/cli-ga
May 1, 2026
Merged

Fix duplicate agent registration; add preview nudge; bump to GA 1.1#398
sellakumaran merged 2 commits intomainfrom
users/sellak/cli-ga

Conversation

@sellakumaran
Copy link
Copy Markdown
Contributor

@sellakumaran sellakumaran commented Apr 30, 2026

  • setup all --agent-name: merge AgentRegistrationId from a365.generated.config.json on bootstrap re-runs so the stored ID is used for idempotency, preventing duplicate POST to copilot/agentRegistrations when the same agent is set up more than once
  • setup all: skip registration with a warning when AgenticAppId is empty, instead of silently posting an invalid request; directs user to retry with --agent-registration-only
  • Version check: add SelectLatestVersions for channel-aware filtering — stable users see stable as primary update target; informational preview nudge shown when a newer preview exists above the latest GA, without triggering the update-required banner
  • Bump version.json from 1.1-preview to 1.1 for GA release (drop preview)

Here's what the output looks like with the corrected nudge logic:

Case A — New stable release available

A newer version is available with bug fixes and improvements.
Current: 1.1.12
Latest: 1.2.0

What's new: https://github.com/microsoft/Agent365-devTools/releases
To update, run: dotnet tool update -g Microsoft.Agents.A365.DevTools.Cli
(yellow — LogWarning)

Case B — On latest stable, newer preview with a higher base version

e.g. current = 1.1.0, NuGet has 1.1.0 + 1.2.0-preview.1:

A preview release is also available: 1.2.0-preview.1
To try it: dotnet tool update -g Microsoft.Agents.A365.DevTools.Cli --prerelease
(default/white — LogInformation)

Case B — same-base preview, no nudge (the fix in the staged diff)

e.g. current = 1.1.0, NuGet has 1.1.0 + 1.1.0-preview.50:

(no output)

- setup all --agent-name: merge AgentRegistrationId from a365.generated.config.json
  on bootstrap re-runs so the stored ID is used for idempotency, preventing duplicate
  POST to copilot/agentRegistrations when the same agent is set up more than once
- setup all: skip registration with a warning when AgenticAppId is empty, instead of
  silently posting an invalid request; directs user to retry with --agent-registration-only
- Version check: add SelectLatestVersions for channel-aware filtering — stable users see
  stable as primary update target; informational preview nudge shown when a newer preview
  exists above the latest GA, without triggering the update-required banner
- Bump version.json from 1.1-preview to 1.1.0 for GA release

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings April 30, 2026 23:30
@sellakumaran sellakumaran requested review from a team as code owners April 30, 2026 23:30
@github-actions github-actions Bot added bug Something isn't working documentation Improvements or additions to documentation labels Apr 30, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 30, 2026

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves a365 setup all idempotency for agent registration, enhances the CLI version-check experience with channel-aware update targeting plus an informational preview nudge, and promotes the CLI from 1.1-preview to 1.1.0 GA.

Changes:

  • Prevent duplicate agent registration by reusing a previously stored AgentRegistrationId during bootstrap re-runs (--agent-name) and by skipping registration when AgenticAppId is missing (with a warning and retry guidance).
  • Add channel-aware version selection so stable users target the latest stable release, while optionally seeing a non-blocking “newer preview available” notice.
  • Bump version.json to 1.1.0 and document the changes in CHANGELOG.md.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/version.json Bumps the CLI version to 1.1.0 (GA).
src/Microsoft.Agents.A365.DevTools.Cli/Services/VersionCheckService.cs Returns both primary latest + optional newer preview from NuGet and caches both.
src/Microsoft.Agents.A365.DevTools.Cli/Services/Internal/VersionCheckHelper.cs Adds SelectLatestVersions to apply channel-aware filtering and compute preview nudge.
src/Microsoft.Agents.A365.DevTools.Cli/Models/VersionCheckModels.cs Extends version check result/cache models to carry NewerPreviewVersion.
src/Microsoft.Agents.A365.DevTools.Cli/Program.cs Prints an informational preview-available message when appropriate.
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Services/VersionCheckServiceTests.cs Adds unit tests for channel-aware version selection.
src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/AllSubcommand.cs In bootstrap mode, merges AgentRegistrationId from generated config to support idempotency.
src/Microsoft.Agents.A365.DevTools.Cli/Commands/SetupSubcommands/NonDwBlueprintSetupOrchestrator.cs Skips agent registration with a warning when AgenticAppId is missing.
CHANGELOG.md Documents the new version-check behavior and setup fixes.

- Refactor agent registration error handling for better reporting and reuse of warning messages.
- Update version selection logic to avoid suggesting previews with the same base version as GA; only nudge for strictly higher-base previews.
- Add tests to verify correct preview suggestion behavior.
- Change version.json from "1.1.0" to "1.1" for precision consistency.
@sellakumaran sellakumaran enabled auto-merge (squash) May 1, 2026 00:07
@sellakumaran sellakumaran merged commit 11c3781 into main May 1, 2026
9 checks passed
@sellakumaran sellakumaran deleted the users/sellak/cli-ga branch May 1, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants