diff --git a/README.md b/README.md index 5472d1cb..adaeb231 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ -# Agent 365 CLI +# Microsoft Agent 365 CLI -A command-line tool for deploying and managing Agent 365 applications on Azure. +A command-line tool for deploying and managing Microsoft Agent 365 applications on Azure. ## Supported Platforms - ✅ .NET Applications - ✅ Node.js Applications -- ✅ **Python Applications** (Auto-detects via `pyproject.toml`, handles Agent 365 dependencies, converts .env to Azure App Settings) +- ✅ **Python Applications** (Auto-detects via `pyproject.toml`, handles Microsoft Agent 365 dependencies, converts .env to Azure App Settings) ## Quick Start @@ -103,7 +103,7 @@ a365 create-instance enable-notifications ```bash a365 deploy # Full build and deploy a365 deploy app # Deploy application binaries to the configured Azure App Service -a365 deploy mcp # Update Agent365 Tool permissions +a365 deploy mcp # Update Microsoft Agent 365 Tool permissions a365 deploy --restart # Skip build, deploy existing publish folder (quick iteration) a365 deploy --inspect # Pause before deployment to verify package contents a365 deploy --restart --inspect # Combine flags for quick redeploy with inspection @@ -113,7 +113,7 @@ a365 cleanup **Deploy Options Explained:** - **Default** (`a365 deploy`): Full build pipeline - platform detection, environment validation, build, manifest creation, packaging, and deployment - **app**: Deploy application binaries to the configured Azure App Service -- **mcp**: Update Agent365 Tool permissions +- **mcp**: Update Microsoft Agent 365 Tool permissions - **`--restart`**: Skip all build steps and start from compressing the existing `publish/` folder. Perfect for quick iteration when you've manually modified files in the publish directory (e.g., tweaking `requirements.txt`, `.deployment`, or other config files) - **`--inspect`**: Pause before deployment to review the publish folder and ZIP contents. Useful for verifying package structure before uploading to Azure - **`--verbose`**: Enable detailed logging for all build and deployment steps diff --git a/docs/commands/deploy.md b/docs/commands/deploy.md index a87672b9..062464a0 100644 --- a/docs/commands/deploy.md +++ b/docs/commands/deploy.md @@ -1,7 +1,7 @@ -# Agent365 CLI – Deploy Command Guide +# Microsoft Agent 365 CLI – Deploy Command Guide > **Command**: `a365 deploy` -> **Purpose**: Deploy your application to Azure App Service **and** update Agent365 Tool (MCP) permissions in one run. Subcommands let you run either phase independently. +> **Purpose**: Deploy your application to Azure App Service **and** update Microsoft Agent 365 Tool (MCP) permissions in one run. Subcommands let you run either phase independently. --- ## TL;DR @@ -190,3 +190,4 @@ Use Log Stream in the Azure Portal for runtime stdout/stderr. - [`a365 config init`](./config-init.md) — initialize configuration --- + diff --git a/src/DEVELOPER.md b/src/DEVELOPER.md index e455739c..6c1b3a15 100644 --- a/src/DEVELOPER.md +++ b/src/DEVELOPER.md @@ -1,12 +1,12 @@ # Microsoft.Agents.A365.DevTools.Cli - Developer Guide -This guide is for contributors and maintainers of the Agent 365 CLI codebase. For end-user installation and usage, see [README.md](./README.md). +This guide is for contributors and maintainers of the Microsoft Agent 365 CLI codebase. For end-user installation and usage, see [README.md](./README.md). --- ## Project Overview -The Agent 365 CLI (`a365`) is a .NET tool that automates the deployment and management of Agent 365 applications on Azure. It handles: +The Microsoft Agent 365 CLI (`a365`) is a .NET tool that automates the deployment and management of Microsoft Agent 365 applications on Azure. It handles: - **Multiplatform deployment** (.NET, Node.js, Python) with automatic platform detection - Agent blueprint and identity creation @@ -552,8 +552,8 @@ a365 deploy --restart --inspect ```bash # Clone repository -git clone https://github.com/microsoft/Agent365.git -cd Agent365/utils/scripts/developer +git clone https://github.com/microsoft/Agent365-devTools.git +cd Agent365-devTools/utils/scripts/developer # Restore dependencies cd Microsoft.Agents.A365.DevTools.Cli @@ -1267,3 +1267,4 @@ Command name detection is automatic - the CLI analyzes command-line arguments to --- + diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Commands/DeployCommand.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Commands/DeployCommand.cs index 96fbce72..7f81eee5 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Commands/DeployCommand.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Commands/DeployCommand.cs @@ -108,7 +108,7 @@ private static Command CreateAppSubcommand( DeploymentService deploymentService, IAzureValidator azureValidator) { - var command = new Command("app", "Deploy Agent365 application binaries to the configured Azure App Service"); + var command = new Command("app", "Deploy Microsoft Agent 365 application binaries to the configured Azure App Service"); var configOption = new Option( new[] { "--config", "-c" }, @@ -205,7 +205,7 @@ private static Command CreateMcpSubcommand( return; } - logger.LogInformation("Starting deploy Agent 365 Tool Permissions..."); + logger.LogInformation("Starting deploy Microsoft Agent 365 Tool Permissions..."); logger.LogInformation(""); // Empty line for readability try @@ -218,7 +218,7 @@ private static Command CreateMcpSubcommand( } catch (Exception ex) { - logger.LogError(ex, "Agent 365 Tool Permissions deploy/update failed: {Message}", ex.Message); + logger.LogError(ex, "Microsoft Agent 365 Tool Permissions deploy/update failed: {Message}", ex.Message); throw; } }, configOption, verboseOption, dryRunOption); @@ -298,7 +298,7 @@ private static async Task DeployApplicationAsync( } /// - /// Convert Agent 365Config to DeploymentConfiguration + /// Convert Microsoft Agent 365 Config to DeploymentConfiguration /// private static DeploymentConfiguration ConvertToDeploymentConfig(Agent365Config config) { @@ -356,7 +356,7 @@ await EnsureAdminConsentForAgenticAppAsync( logger ); - logger.LogInformation("Deploy Agent 365 Tool Permissions completed successfully!"); + logger.LogInformation("Deploy Microsoft Agent 365 Tool Permissions completed successfully!"); } private static async Task EnsureMcpOauth2PermissionGrantsAsync( @@ -471,3 +471,4 @@ private static void HandleDeploymentException(Exception ex, ILogger logger) } } } + diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Program.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Program.cs index 6e98879d..40decb4e 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Program.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Program.cs @@ -100,7 +100,7 @@ static async Task Main(string[] args) } catch (Exceptions.Agent365Exception ex) { - // Structured Agent365 exception - display user-friendly error message + // Structured Microsoft Agent 365 exception - display user-friendly error message // No stack trace for user errors (validation, config, auth issues) HandleAgent365Exception(ex); return ex.ExitCode; @@ -112,7 +112,7 @@ static async Task Main(string[] args) Console.ForegroundColor = ConsoleColor.Red; Console.Error.WriteLine(); Console.Error.WriteLine("Unexpected error occurred. This may be a bug in the CLI."); - Console.Error.WriteLine("Please report this issue at: https://github.com/microsoft/Agent365/issues"); + Console.Error.WriteLine("Please report this issue at: https://github.com/microsoft/Agent365-devTools/issues"); Console.Error.WriteLine(); Console.ResetColor(); return 1; @@ -139,7 +139,7 @@ private static void HandleAgent365Exception(Exceptions.Agent365Exception ex) if (!ex.IsUserError) { Console.Error.WriteLine("If this error persists, please report it at:"); - Console.Error.WriteLine("https://github.com/microsoft/Agent365/issues"); + Console.Error.WriteLine("https://github.com/microsoft/Agent365-devTools/issues"); Console.Error.WriteLine(); } @@ -170,7 +170,7 @@ private static void ConfigureServices(IServiceCollection services) services.AddSingleton(); services.AddSingleton(); - // Add Agent365 Tooling Service with environment detection + // Add Microsoft Agent 365 Tooling Service with environment detection services.AddSingleton(provider => { var configService = provider.GetRequiredService(); @@ -252,3 +252,4 @@ private static string DetectCommandName(string[] args) .Replace("_", "-"); } } + diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Services/Agent365ToolingService.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Services/Agent365ToolingService.cs index c268d213..651cc800 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Services/Agent365ToolingService.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Services/Agent365ToolingService.cs @@ -10,7 +10,7 @@ namespace Microsoft.Agents.A365.DevTools.Cli.Services; /// -/// Service for interacting with Agent365 Tooling API endpoints for MCP server management in Dataverse +/// Service for interacting with Microsoft Agent 365 Tooling API endpoints for MCP server management in Dataverse /// Handles authentication, HTTP communication, and response deserialization /// public class Agent365ToolingService : IAgent365ToolingService @@ -34,7 +34,7 @@ public Agent365ToolingService( /// /// Common helper method to handle HTTP response validation and logging. - /// Handles double-serialized JSON responses from the Agent365 API. + /// Handles double-serialized JSON responses from the Microsoft Agent 365 API. /// /// The HTTP response message /// Name of the operation for logging purposes @@ -59,7 +59,7 @@ public Agent365ToolingService( _logger.LogInformation("Received response from {Operation} endpoint", operationName); _logger.LogDebug("Response content: {ResponseContent}", responseContent); - // Check if response content indicates failure (Agent365 API pattern) + // Check if response content indicates failure (Microsoft Agent 365 API pattern) // The API may return double-serialized JSON, so we use JsonDeserializationHelper if (!string.IsNullOrWhiteSpace(responseContent)) { @@ -126,10 +126,10 @@ private void LogRequest(string method, string url, string? payload = null) } /// - /// Builds base URL for Agent365 Tools API based on environment + /// Builds base URL for Microsoft Agent 365 Tools API based on environment /// /// Environment name (test, preprod, prod) - /// Base URL for the Agent365 Tools API + /// Base URL for the Microsoft Agent 365 Tools API private string BuildAgent365ToolsBaseUrl(string environment) { // Get from ConfigConstants to leverage existing URL construction logic @@ -604,3 +604,4 @@ public async Task BlockServerAsync( } } } + diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Services/DeploymentService.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Services/DeploymentService.cs index 304380de..f2b28486 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Services/DeploymentService.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Services/DeploymentService.cs @@ -1,6 +1,6 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - +// Copyright (c) Microsoft Corporation. +// Licensed under the MIT License. + using System.IO.Compression; using Microsoft.Agents.A365.DevTools.Cli.Models; using Microsoft.Extensions.Logging; @@ -267,7 +267,7 @@ private async Task OfferPublishInspectionAsync(string publishPath, string zipPat _logger.LogInformation("Key files to verify:"); _logger.LogInformation(" - .deployment (should contain: SCM_DO_BUILD_DURING_DEPLOYMENT=true)"); _logger.LogInformation(" - requirements.txt (should have: --find-links=dist)"); - _logger.LogInformation(" - dist/*.whl (local Agent365 packages)"); + _logger.LogInformation(" - dist/*.whl (local Microsoft Agent 365 packages)"); _logger.LogInformation(""); Console.Write("Proceed with deployment? [Y/n]: "); @@ -285,3 +285,4 @@ private async Task OfferPublishInspectionAsync(string publishPath, string zipPat await Task.CompletedTask; } } + diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Services/IAgent365ToolingService.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Services/IAgent365ToolingService.cs index de946af0..b3fcbb0e 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Services/IAgent365ToolingService.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Services/IAgent365ToolingService.cs @@ -5,7 +5,7 @@ namespace Microsoft.Agents.A365.DevTools.Cli.Services; /// -/// Service for interacting with Agent365 Tooling API endpoints for MCP server management in Dataverse +/// Service for interacting with Microsoft Agent 365 Tooling API endpoints for MCP server management in Dataverse /// public interface IAgent365ToolingService { @@ -72,3 +72,4 @@ Task BlockServerAsync( string serverName, CancellationToken cancellationToken = default); } + diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Services/IConfigService.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Services/IConfigService.cs index 6facbd2a..3020102e 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Services/IConfigService.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Services/IConfigService.cs @@ -7,7 +7,7 @@ namespace Microsoft.Agents.A365.DevTools.Cli.Services; /// -/// Service for loading, saving, and validating Agent365 configuration. +/// Service for loading, saving, and validating Microsoft Agent 365 configuration. /// /// DESIGN PATTERN: Handles merge (load) and split (save) of two-file config model /// - LoadAsync: Merges a365.config.json + a365.generated.config.json to single Agent365Config diff --git a/src/Microsoft.Agents.A365.DevTools.Cli/Services/PythonBuilder.cs b/src/Microsoft.Agents.A365.DevTools.Cli/Services/PythonBuilder.cs index 8f61041c..90d3234b 100644 --- a/src/Microsoft.Agents.A365.DevTools.Cli/Services/PythonBuilder.cs +++ b/src/Microsoft.Agents.A365.DevTools.Cli/Services/PythonBuilder.cs @@ -231,12 +231,12 @@ public async Task CreateManifestAsync(string projectDir, string pu private string DetectStartCommand(string projectDir, string publishPath) { - // First, check for Agent365-specific entry points with smart content analysis + // First, check for Microsoft Agent 365-specific entry points with smart content analysis var agentEntryPoints = new[] { "start_with_generic_host.py", "host_agent_server.py" }; var detectedAgentEntry = DetectBestAgentEntry(publishPath, agentEntryPoints); if (!string.IsNullOrEmpty(detectedAgentEntry)) { - _logger.LogInformation("Detected Agent365 entry point: {File}, using command: python {File}", detectedAgentEntry, detectedAgentEntry); + _logger.LogInformation("Detected Microsoft Agent 365 entry point: {File}, using command: python {File}", detectedAgentEntry, detectedAgentEntry); return $"python {detectedAgentEntry}"; } @@ -332,7 +332,7 @@ private string DetectBestAgentEntry(string publishPath, string[] agentFiles) var hasMain = content.Contains("if __name__ == \"__main__\":") || content.Contains("def main("); var priority = CalculateAgentEntryPriority(file, content); foundFiles.Add((file, priority, hasMain)); - _logger.LogDebug("Found Agent365 entry candidate: {File} (priority: {Priority}, hasMain: {HasMain})", file, priority, hasMain); + _logger.LogDebug("Found Microsoft Agent 365 entry candidate: {File} (priority: {Priority}, hasMain: {HasMain})", file, priority, hasMain); } } @@ -346,7 +346,7 @@ private string DetectBestAgentEntry(string publishPath, string[] agentFiles) .ThenBy(f => f.file) .First(); - _logger.LogInformation("Selected best Agent365 entry point: {File} (priority: {Priority}, hasMain: {HasMain})", + _logger.LogInformation("Selected best Microsoft Agent 365 entry point: {File} (priority: {Priority}, hasMain: {HasMain})", best.file, best.priority, best.hasMain); return best.file;