Skip to content
This repository was archived by the owner on Nov 5, 2026. It is now read-only.

Separate plugin origin from package-reported agent - #53

Merged
Steven J (tonystevenj) merged 2 commits into
mainfrom
users/hongjingwang/plugin-agent-report
Nov 4, 2026
Merged

Steven J (tonystevenj) merged 2 commits into
mainfrom
users/hongjingwang/plugin-agent-report

Conversation

@tonystevenj

Copy link
Copy Markdown
Contributor

Summary

  • Default MS_CLI_ORIGIN to plugin for commands that invoke the Managed Apps CLI.
  • Set MS_PLUGIN_REPORT_AGENT=github-copilot only from the native Copilot hook entry point. The shared package does not identify the host.
  • Remove inherited agent reports in shared hooks so the CLI can use its own environment detection.
  • Remove environment-based agent detection and the synthetic COPILOT_CLI marker from plugin hooks.
  • Preserve explicit origin overrides, including empty values and inline assignments.
  • Update existing hook tests, compatibility checks, and documentation. Set plugin metadata to 2.1.8.

Compatibility

The plugin reports the agent only when its entry point identifies the host. The native Copilot entry point does not distinguish CLI from VS Code, so it reports the generic github-copilot label. Shared hooks do not guess Claude, Codex, Cursor, or another host.

Release CLI support for MS_PLUGIN_REPORT_AGENT before this plugin version. Older CLIs do not consume the new report and may lose agent attribution when the origin becomes channel-only.

This branch includes the latest main after microsoft/managed-apps#37 merged.

Validation

  • 54 existing Node tests passed.
  • All 43 compatibility tests passed again after the version update.
  • 96 cross-shell execution cases passed across both hook scripts, Bash, and PowerShell 7. Cases cover native report replacement, shared report removal, empty origins, and inline overrides.
  • Package validation, session and compaction guidance checks, shell syntax, and whitespace checks passed.
  • Python skill validation could not run because the pinned dependency download from files.pythonhosted.org failed with TLS HandshakeFailure.
  • No live app or connector test was run.

Default origin to plugin, report github-copilot only from the native entry point, and remove inherited reports in shared hooks. Preserve origin overrides and update existing checks and documentation.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Integrate merged packaging PR #37 and current app guidance. Bump plugin metadata to 2.1.8 because main now uses 2.1.7.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@tonystevenj
Steven J (tonystevenj) requested a review from a team as a code owner November 3, 2026 00:59

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The origin/agent ownership split looks good and matches the CLI attribution contract: default origin to plugin, report fixed github-copilot only from the native entry point, and leave detection and report validation to the CLI. Shared hooks correctly remove inherited reports rather than setting empty values, preserving passive fallback. Existing origin overrides remain supported.

Please release a CLI version supporting MS_PLUGIN_REPORT_AGENT before distributing plugin 2.1.8. Approval or merge of bic/PowerPlatform-Managed-Host#2024 alone is not sufficient; the consuming CLI version must be published to avoid losing attribution on older CLIs.

@tonystevenj
Steven J (tonystevenj) merged commit 530af98 into main Nov 4, 2026
3 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants