feat(zephyr-agent): show outdated version warning in plugins#393
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a plugin-facing terminal warning intended to notify users when their Zephyr plugin version is outdated, plus utilities/tests to determine which Zephyr plugin package is in use.
Changes:
- Added
resolveZephyrPluginPackageName()to infer the Zephyr plugin package name from an app’spackage.jsondeps. - Added
maybeShowOutdatedPluginWarning()which checks npm dist-tags and emits a one-time console error warning. - Hooked the warning into
ZephyrEngine.create()and added Jest coverage for the new utilities.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| libs/zephyr-agent/src/zephyr-engine/index.ts | Calls the new outdated-warning logic during engine initialization. |
| libs/zephyr-agent/src/lib/version/plugin-package-name.ts | Implements plugin package name resolution based on builder + declared deps. |
| libs/zephyr-agent/src/lib/version/plugin-package-name.test.ts | Tests plugin package name resolution + fallback behavior. |
| libs/zephyr-agent/src/lib/version/outdated-plugin-warning.ts | Implements npm-registry-based latest-version lookup + warning emission. |
| libs/zephyr-agent/src/lib/version/outdated-plugin-warning.test.ts | Tests warning emission, non-emission, and one-time behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
zackarychapple
approved these changes
Mar 7, 2026
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.
What's added in this PR?
Implements plugin-side outdated-version UX directly in
zephyr-agent(no gateway/header dependency).Details:
ZephyrEngine.create:Your Zephyr Plugin version is outdated ...If you are facing any issue, upgrade <plugin-package-name> first.BUILDER_PLUGIN_CANDIDATES[builder] is not iterable).Screenshots
N/A (terminal output only)
What's the issues or discussion related to this PR ?
Context: users on older plugin versions should get immediate troubleshooting guidance from the plugin itself, without requiring API gateway support.
What are the steps to test this PR?
pnpm nx test zephyr-agent --runInBandpnpm nx build zephyr-agentlatestthan current and verify one warning is printed.Documentation update for this PR (if applicable)?
No docs update in this PR.
(Optional) What's left to be done for this PR?
None.
(Optional) What's the potential risk and how to mitigate it?
Risk: extra npm registry request on initialization.
Mitigation: non-blocking behavior; failures to fetch latest are ignored.
(Required) Pre-PR/Merge checklist