Add version check skill - #449
Open
Ameya Apte (ameyaapte1) wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new /version-check skill to the mobile-apps plugin, backed by a Node script and CI tests, to detect newer plugin releases and safely preview/apply native host template upgrades (pinned to the npm latest host version) within the plugin’s supported template ceiling.
Changes:
- Introduce
/version-checkskill with a guarded workflow for npm-host version resolution, dry-run preview, and bounded upgrades/conflict-handling. - Replace the old shared “min versions” document with a shared preflight that runs
scripts/check-version.js, plus add repo CI coverage for the script and markdown invariants. - Update plugin docs/status to reflect the new skill and guidance (README/AGENTS/shared instructions), and remove outdated references.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/mobile-apps/skills/version-check/SKILL.md | New skill workflow for checking plugin updates and running pinned host template upgrade previews/applies. |
| plugins/mobile-apps/skills/deploy/SKILL.md | Removes reference to the deleted shared version-check document. |
| plugins/mobile-apps/skills/create-mobile-app/SKILL.md | Removes reference to the deleted shared version-check document. |
| plugins/mobile-apps/shared/version-check.md | Deletes the previous hardcoded “minimum versions” guidance document. |
| plugins/mobile-apps/shared/shared-instructions.md | Updates shared instructions to run scripts/check-version.js and adds “package version source of truth” guidance. |
| plugins/mobile-apps/scripts/tests/check-version.test.js | Adds unit tests covering cache behavior, remote manifest parsing, and markdown invariants. |
| plugins/mobile-apps/scripts/check-version.js | Adds fail-open plugin update checker with 7-day cache in user cache dir. |
| plugins/mobile-apps/README.md | Documents /version-check in the skill list. |
| plugins/mobile-apps/AGENTS.md | Updates plugin status counts and adds policy notes about version checks and manifest-sourced versions. |
| .github/workflows/mobile-apps-script-tests.yml | Adds path-filtered CI workflow to run the new script tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+11
to
+17
| At the start of every skill, run: | ||
|
|
||
| Run at the start of every skill execution (at most once per day). Notifies the user if a tool version is below the supported minimum (Node 22+, npm 10+, Expo SDK 55+, etc.). | ||
| ```bash | ||
| node "${PLUGIN_ROOT}/scripts/check-version.js" | ||
| ``` | ||
|
|
||
| Show any output, then continue the requested skill. The checker is fail-open and caches remote results (including failed attempts) for seven days in the user's cache directory, so invoking it every time does not repeatedly access the network or modify the app. A previously discovered newer plugin remains visible while offline until the user updates it. |
| - ✅ Auth: `/create-mobile-app` resolves the tenant from the selected Power Platform environment (`scripts/resolve-environment.js`), writes that tenant to `auth.config.json`, then lets the user paste an app registration client ID, create one from the Power Apps Wrap page and paste it, or skip auth for later. `/set-app-registration-native` is a manual helper for the same Wrap-page + pasted-client-ID flow. | ||
| - ✅ `/add-native` v0 scope: camera, location, push, biometrics, secure-store (already in template) | ||
| - ✅ Template is supplied as a fresh `pa-wrap-tools/templates/expo-app-standalone` folder before `/create-mobile-app` runs; users materialize it with `degit`, run `npm install`, then invoke the skill from that folder. The skill validates/prepares the folder and runs `npx power-apps init`. | ||
| - ✅ Every top-level skill runs the fail-open `scripts/check-version.js` preflight through `shared/shared-instructions.md`. Remote checks are cached for seven days outside the app; CI verifies every skill retains the shared-instructions reference. `/version-check` uses the same release check, resolves the npm feed's `latest` native host version once, pins preview/apply commands to it, reads its safe ceiling from bundled `template/app.json`, and applies only approved sequential migrations within that ceiling. Straightforward `.rej` conflicts are merged with customization markers and pre-existing diffs preserved; ambiguous behavioral conflicts get one bounded retry before user escalation. |
Comment on lines
+21
to
+29
| function compareSemver(localVersion, remoteVersion) { | ||
| const localParts = localVersion.split('.').map(Number); | ||
| const remoteParts = remoteVersion.split('.').map(Number); | ||
| for (let index = 0; index < 3; index += 1) { | ||
| if ((remoteParts[index] || 0) > (localParts[index] || 0)) return 1; | ||
| if ((remoteParts[index] || 0) < (localParts[index] || 0)) return -1; | ||
| } | ||
| return 0; | ||
| } |
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.
No description provided.