Enhance a365 config init interactive config wizard#9
Merged
sellakumaran merged 9 commits intomainfrom Nov 14, 2025
Merged
Conversation
Introduced the `develop-mcp` command for managing MCP servers in Dataverse environments. Added subcommands for listing environments and servers, publishing, unpublishing, approving, and blocking MCP servers. All commands support `--dry-run` and `--config` options. Updated `README.md` and `DEVELOPER.md` with examples and usage details for the new commands. Refactored the CLI codebase to include a new `DevelopMcpCommand` class and models for environments and servers. Implemented `Agent365ToolingService` for API interactions with detailed logging and error handling. Enhanced configuration and logging in `install-cli.ps1`. Added regression and unit tests to ensure Azure CLI-style parameters, dry-run functionality, and consistent option patterns. Introduced `JsonDeserializationHelper` for handling double-serialized JSON responses. Updated constants and utilities for streamlined configuration. Improved developer experience with better error handling and documentation. Ensured compliance with Azure CLI patterns and added comprehensive logging for debugging and audit trails.
Enhanced `a365 develop-mcp` commands with a `--verbose` option for detailed logging and improved input validation via a new `InputValidator` class. Simplified configuration handling by making `--config` optional and defaulting to production. Refactored `Agent365ToolingService` to use constructor-injected environments and adjusted logging levels for better debugging. Improved error handling for API responses and JSON deserialization. Updated documentation to reflect new features and architecture principles. Added tests for `--verbose` and ensured compliance with the MIT License. General code cleanup for consistency and maintainability.
- Added an interactive configuration wizard (`a365 config init`) with Azure CLI integration, smart defaults, and minimal input requirements. - Introduced `AzureCliService` and `ConfigurationWizardService` to streamline Azure resource detection and configuration. - Updated `README.md` and `DEVELOPER.md` to document new features and usage. - Refactored `ConfigCommand` to support file imports, global configurations, and improved logging. - Added models for Azure resources (`AzureAccountInfo`, `AzureResourceGroup`, etc.) to enhance data handling. - Improved test coverage with new tests for configuration import, Azure CLI interactions, and error handling. - Enhanced logging, validation, and error messages for better user experience. - Updated `ProjectSettingsSyncHelper` and added utility methods for resource name generation and validation.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds an interactive configuration wizard for Agent 365 CLI with Azure CLI integration and introduces MCP (Model Context Protocol) server management capabilities. The changes significantly improve the developer experience by minimizing manual configuration and leveraging existing Azure infrastructure.
Key Changes
- Added interactive configuration wizard (
a365 config init) with Azure CLI integration, smart defaults, and auto-generation of resource names - Introduced
develop-mcpcommand for managing MCP servers in Dataverse environments with list, publish, unpublish, approve, and block operations - Enhanced configuration handling with
AzureCliServicefor Azure resource detection andConfigurationWizardServicefor guided setup - Added comprehensive test coverage for Azure CLI interactions, MCP commands, and configuration workflows
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
AzureCliServiceTests.cs |
New comprehensive test suite for Azure CLI service integration with account info, resource groups, app service plans, and locations |
DevelopMcpCommandTests.cs |
New tests validating MCP command structure, options, aliases, and Azure CLI compliance |
DevelopMcpCommandRegressionTests.cs |
New regression tests ensuring dry-run mode, parameter handling, and service integration work correctly |
ConfigCommandTests.cs |
Updated tests for config command with wizard service integration and improved test infrastructure |
IAzureCliService.cs |
New interface defining Azure CLI interaction methods for account info and resource discovery |
IAgent365ToolingService.cs |
New interface for Agent365 Tooling API operations including MCP server management |
JsonDeserializationHelper.cs |
New helper for handling double-serialized JSON responses from APIs |
ConfigurationWizardService.cs |
New service implementing interactive configuration wizard with Azure CLI integration and validation |
AzureCliService.cs |
New service implementing Azure CLI command execution and JSON response parsing |
Agent365ToolingService.cs |
New service for interacting with Agent365 Tooling API endpoints |
Program.cs |
Updated to add verbose logging support, new service registrations, and environment detection |
PublishMcpServerResponse.cs |
New model for MCP server publish operation responses |
PublishMcpServerRequest.cs |
New model for MCP server publish requests |
DataverseMcpServer.cs |
New models for Dataverse MCP servers with comprehensive properties |
DataverseEnvironment.cs |
New models for Dataverse environments |
ConfigDerivedNames.cs |
New model for configuration-derived resource names |
AzureModels.cs |
New models for Azure account, resource group, app service plan, and location information |
ProjectSettingsSyncHelper.cs |
Updated to sync AgentId to environment variables across platforms |
McpConstants.cs |
Cleaned up unused GetMcpServerBaseUrl method |
DevelopMcpCommand.cs |
New command implementation for MCP server management with input validation and security checks |
ConfigCommand.cs |
Refactored to use wizard service for interactive configuration |
DEVELOPER.md |
Updated with comprehensive documentation for config wizard and develop-mcp command |
install-cli.ps1 |
Updated script path references and build parameters |
README.md |
Updated with improved configuration wizard documentation and MCP server management examples |
Comments suppressed due to low confidence (3)
src/Microsoft.Agents.A365.DevTools.Cli/Program.cs:200
- The catch block silently swallows exceptions when loading config from the specified path. While this may be intentional as a fallback to "prod", it could hide configuration errors. Consider logging the exception at Debug or Warning level to aid troubleshooting, especially since this runs during service configuration.
catch
{
// If config loading fails, stick with default "prod"
// This is fine - the service will work with default environment
}
}
src/DEVELOPER.md:584
- The
install-cli.ps1script path reference in the documentation is inconsistent with the actual script location. Line 583 says "From scripts/cli directory" but the script is actually atscripts/cli/install-cli.ps1in the repository root, not in adeveloper/directory as mentioned in the old comment being replaced.
# From scripts/cli directory
.\install-cli.ps1
src/Microsoft.Agents.A365.DevTools.Cli/Program.cs:199
- Generic catch clause.
catch
{
// If config loading fails, stick with default "prod"
// This is fine - the service will work with default environment
}
src/Microsoft.Agents.A365.DevTools.Cli/Models/ConfigDerivedNames.cs
Outdated
Show resolved
Hide resolved
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Commands/ConfigCommandTests.cs
Show resolved
Hide resolved
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Commands/ConfigCommandTests.cs
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
Refactored `AzureAccountInfo` and `ConfigDerivedNames` classes to the `Models` namespace for better organization. Updated `using` directives in `AzureCliService` and `IAzureCliService` to reflect the namespace changes. Removed unused `userName` variable from `GenerateDerivedNames` in `ConfigurationWizardService` to simplify the method logic.
…t/Agent365-devTools into users/sellak/developMcp
mengyimicro
previously approved these changes
Nov 14, 2025
mengyimicro
reviewed
Nov 14, 2025
Contributor
mengyimicro
left a comment
There was a problem hiding this comment.
should we update docs/commands/config-init.md for the latest usage?
pontemonti
reviewed
Nov 14, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
pontemonti
reviewed
Nov 14, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
pontemonti
reviewed
Nov 14, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
pontemonti
reviewed
Nov 14, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
pontemonti
reviewed
Nov 14, 2025
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Outdated
Show resolved
Hide resolved
tmlsousa
previously approved these changes
Nov 14, 2025
rahuldevikar761
previously approved these changes
Nov 14, 2025
Enhanced the `a365 config init` command with improved documentation, smarter defaults, and better user guidance. Key updates include: - Updated documentation to emphasize interactive wizard features, Azure CLI integration, and smart defaults. - Added detailed validation for inputs like project paths, resource groups, and manager emails. - Introduced a configuration summary and optional name customization step. - Improved logging for success, errors, and user cancellations. - Enhanced Azure CLI integration with better error handling and resource discovery. - Streamlined setup and deployment instructions, removing redundant steps. - Standardized error messages and improved user feedback throughout the wizard. These changes improve the overall user experience and robustness of the configuration process.
874ce3e
mengyimicro
previously approved these changes
Nov 14, 2025
Resolves Request_ResourceNotFound errors during blueprint setup by implementing exponential backoff retry (5 attempts: 2s, 4s, 8s, 16s, 32s) to handle Azure AD application object propagation delays. Previously, the code attempted FIC creation immediately after a 10s delay, which was insufficient for Azure AD eventual consistency. Now automatically retries with clear user feedback when propagation errors are detected.
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Commands/ConfigCommandTests.cs
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
src/Microsoft.Agents.A365.DevTools.Cli/Services/ConfigurationWizardService.cs
Show resolved
Hide resolved
tmlsousa
previously approved these changes
Nov 14, 2025
The `AgentDescription` property in the `ConfigurationWizardService` class was updated to remove the word "Demo" from the description. The new value is `"Agent 365 Agent"`, reflecting a shift in naming convention or branding to make the description more general or production-ready.
tmlsousa
approved these changes
Nov 14, 2025
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.
a365 config init) with Azure CLI integration, smart defaults, and minimal input requirements.AzureCliServiceandConfigurationWizardServiceto streamline Azure resource detection and configuration.README.mdandDEVELOPER.mdto document new features and usage.ConfigCommandto support file imports, global configurations, and improved logging.AzureAccountInfo,AzureResourceGroup, etc.) to enhance data handling.ProjectSettingsSyncHelperand added utility methods for resource name generation and validation.