Skip to content

fix: publish command now packages manifest and provides manual upload instructions#315

Merged
sellakumaran merged 7 commits intomainfrom
users/sellak/publish-manual
Mar 11, 2026
Merged

fix: publish command now packages manifest and provides manual upload instructions#315
sellakumaran merged 7 commits intomainfrom
users/sellak/publish-manual

Conversation

@sellakumaran
Copy link
Copy Markdown
Contributor

Summary

  • a365 publish now updates manifest IDs, creates manifest.zip, and prints step-by-step instructions for uploading via the Microsoft 365 Admin Center
  • Removed service dependencies no longer needed by the publish workflow
  • Cleaned up unused code and constants (~3,000 lines removed)

Why

Separating the manifest packaging step from the upload step simplifies the publish workflow, removes external service dependencies, and aligns the CLI with the standard Microsoft 365 Admin Center agent upload experience.

Manual upload instructions (new flow)

After running a365 publish, users are prompted to:

  1. Go to the Microsoft 365 Admin Center (https://admin.microsoft.com)
  2. Navigate to Agents > All agents
  3. Click Upload custom agent and upload manifest.zip

Detailed instructions: https://learn.microsoft.com/en-us/copilot/microsoft-365/agent-essentials/agent-lifecycle/agent-upload-agents

🤖 Generated with Claude Code

sellakumaran and others added 2 commits March 10, 2026 18:05
- PublishCommand now only updates manifest files, creates manifest.zip,
  and prints manual upload instructions (Agents > All agents > Upload custom agent)
- Removed MOS Titles upload, token acquisition, and Graph API steps from publish
- Removed --mos-env, --mos-token, --skip-graph options
- Deleted AgentPublishService, MosTokenService, PublishHelpers (dead code)
- Stripped MosConstants to PowerPlatform-only; removed internal TPS/MOS Titles
  app IDs, scope GUIDs, and service URLs
- Removed dead MOS error message helpers from ErrorMessages
- Updated PublishCommandTests to match new simplified signature and added
  zip creation test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove unused agentBlueprintService parameter from CreateCommand signature
  and its callsite in Program.cs (CR-001)
- Replace magic-number zip cap (4) and arbitrary file padding loop with a
  clean LINQ expression over known candidate filenames (CR-002)
- Remove dead --verbose option binding in publish command handler; startup-
  level --verbose in Program.cs continues to work (CR-003)
- Add CHANGELOG [Unreleased] entry for the breaking behavior change (CR-004)
- Remove redundant Console.SetIn call inside zip creation test; constructor
  already sets it (CR-005)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sellakumaran sellakumaran requested review from a team as code owners March 11, 2026 16:33
Copilot AI review requested due to automatic review settings March 11, 2026 16:33
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 refactors a365 publish to stop performing automated MOS/Graph publishing and instead generate a manifest.zip for manual upload via the Microsoft 365 Admin Center, removing the associated MOS token acquisition and Graph publish workflow code.

Changes:

  • Simplifies a365 publish to update manifest IDs, create manifest.zip, and print manual upload instructions.
  • Removes MOS token service, Graph publish service, and MOS prerequisite helper code along with their tests.
  • Updates DI wiring and changelog to reflect the new publish behavior.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Microsoft.Agents.A365.DevTools.Cli/Commands/PublishCommand.cs Removes automated upload/Graph steps; updates manifests, creates zip, and prints manual upload instructions.
src/Microsoft.Agents.A365.DevTools.Cli/Program.cs Removes AgentPublishService wiring and updates PublishCommand registration.
src/Microsoft.Agents.A365.DevTools.Cli/Constants/MosConstants.cs Reduces constants to Power Platform-related entries (leaving a naming mismatch).
src/Microsoft.Agents.A365.DevTools.Cli/Constants/ErrorMessages.cs Removes MOS-specific mitigation helpers that are no longer used.
src/Tests/Microsoft.Agents.A365.DevTools.Cli.Tests/Commands/PublishCommandTests.cs Updates tests and adds a success-path zip-creation test.
src/Microsoft.Agents.A365.DevTools.Cli/Services/MosTokenService.cs Removed (MOS token acquisition/caching no longer used by publish).
src/Microsoft.Agents.A365.DevTools.Cli/Services/AgentPublishService.cs Removed (Graph publish workflow no longer used by publish).
src/Microsoft.Agents.A365.DevTools.Cli/Helpers/PublishHelpers.cs Removed (MOS prerequisites helper no longer used by publish).
src/Tests/.../MosTokenServiceTests.cs Removed alongside MosTokenService.
src/Tests/.../MosTokenServiceCacheTests.cs Removed alongside MosTokenService cache behavior.
src/Tests/.../AgentPublishServiceTests.cs Removed alongside AgentPublishService.
src/Tests/.../PublishHelpersTests.cs Removed alongside PublishHelpers.
CHANGELOG.md Documents the changed a365 publish behavior under Unreleased.

You can also share your feedback on Copilot code review. Take the survey.

sellakumaran and others added 3 commits March 11, 2026 09:38
Kept HEAD versions for PublishCommand.cs and Program.cs (our zip-only
simplification). Kept deletion of MosTokenService.cs and
MosTokenServiceTests.cs. Merged both CHANGELOG [Unreleased] entries.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update Program.cs to use AzureAuthValidator directly (replaces removed
  IAzureValidator/AzureValidator), remove AzureWebAppCreator resolution,
  and pass authValidator to CleanupCommand
- Delete MosPrerequisitesRequirementCheck and its test — this check wraps
  the deleted PublishHelpers and is no longer needed after the publish
  command was stripped to zip-only

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace verbose section headers and wall-of-text guidance with a terse
  column-aligned field list (version, name.short, name.full, descriptions,
  developer.*, icons)
- Remove duplicate success messages; single 'Manifest updated: {path}' line
- Move per-file zip log entries to LogDebug
- Remove mixed Console.WriteLine / logger calls; output consistent through logger
- Add blank line after interactive prompt block before 'Package created:'
- Fix column alignment: replace 'color.png / outline.png' key with 'icons'
- Add name.short > 30 char warning
- Remove unused logger parameters from UpdateManifestFileAsync and
  UpdateAgenticUserManifestTemplateFileAsync
- Update tests: remove Console.SetIn workarounds that are no longer needed
  for early-exit paths; add WithDisplayNameExceeding30Chars_LogsWarning test

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 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

File and class name no longer reflect their contents after MOS upload
infrastructure was removed. The remaining constants relate solely to the
Power Platform API (CopilotStudio permissions), so rename to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 11, 2026 17:11
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

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


You can also share your feedback on Copilot code review. Take the survey.

- Delegate zip creation to ManifestTemplateService.CreateManifestZipAsync,
  removing duplicate inline implementation and aligning file list with the
  service's canonical set (fixes comments #1 and #2)
- Move per-file zip log entries to LogDebug in ManifestTemplateService so
  the command output remains terse
- Fix --dry-run option description: "without writing files or creating the zip"
  (fixes comment #3)
- Handle null/empty displayName in name.short guidance with explicit warning
  instead of printing currently: "" (fixes comment #4)
- Update test class summary to reflect current Console.In redirect approach
  (fixes comment #6)
- Fix CHANGELOG: interactive prompts occur only in interactive terminals;
  stdin redirect suppresses them in scripts (fixes comment #7)
- Comment #5 (PowerPlatformConstants summary) already resolved by prior rename

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sellakumaran sellakumaran merged commit 44f3eb9 into main Mar 11, 2026
8 checks passed
@sellakumaran sellakumaran deleted the users/sellak/publish-manual branch March 11, 2026 20:54
sellakumaran added a commit that referenced this pull request Mar 12, 2026
Remove all references to the internal MOS (Microsoft Online Services)
Titles service that were left over after PR #315 stripped the upload
logic from the publish command.

- Rewrite DEVELOPER.md publish section to reflect zip-only workflow
- Update README.md, design.md, and subdirectory READMEs accordingly
- Remove dead MOS error codes from ErrorCodes.cs and ErrorMessages.cs
- Update deprecation messages in CreateInstanceCommand and A365CreateInstanceRunner
- Fix comment in PermissionsSubcommand referencing "MOS Power Platform API"
- Remove stale MosConstants, MosTokenService, AgentPublishService, PublishHelpers
  entries from README docs (those files no longer exist)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sellakumaran added a commit that referenced this pull request Mar 12, 2026
Remove all references to the internal MOS (Microsoft Online Services)
Titles service that were left over after PR #315 stripped the upload
logic from the publish command.

- Rewrite DEVELOPER.md publish section to reflect zip-only workflow
- Update README.md, design.md, and subdirectory READMEs accordingly
- Remove dead MOS error codes from ErrorCodes.cs and ErrorMessages.cs
- Update deprecation messages in CreateInstanceCommand and A365CreateInstanceRunner
- Fix comment in PermissionsSubcommand referencing "MOS Power Platform API"
- Remove stale MosConstants, MosTokenService, AgentPublishService, PublishHelpers
  entries from README docs (those files no longer exist)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants