fix: improve Foundry Copilot app preflight - #3061
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Microsoft Foundry “Copilot app entry” preflight to be read-only, improve GitHub Copilot CLI discovery (PATH, overrides, and github-copilot-sdk bundled locations), and update the hosted-agent docs to reflect the new [OK]/[WARN]/[ACTION] semantics and consent/install guidance.
Changes:
- Enhance Bash/PowerShell preflight scripts to locate the Copilot CLI from multiple sources and report whether the
microsoft-foundryplugin is installed (without silently installing it). - Remove the Bash
python3dependency by switching to a lightweight JSON-name match for plugin detection. - Update hosted-agent markdown workflows to document the new preflight behavior and the required user-facing messaging after successful install.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh | Adds multi-source Copilot CLI discovery and read-only plugin detection; emits [OK]/[WARN]/[ACTION] with exit code semantics. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.ps1 | Mirrors the read-only preflight behavior in PowerShell, including CLI discovery and plugin detection. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/quick-start-hosted.md | Updates quickstart instructions for the new preflight output semantics and consent/install flow. |
| plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/create-hosted.md | Updates the full workflow to treat Copilot plugin installation as non-blocking while keeping environment verification [ACTION] items blocking. |
Suppressed comments (2)
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh:77
- The
COPILOT_CLI_PATHoverride only checks for file existence (-f), but the path is executed later. If it points to a non-executable file, the script will stop searching and then fail at runtime. Checking-xavoids selecting an unusable CLI and allows fallback discovery to proceed.
if [ -n "${COPILOT_CLI_PATH:-}" ] && [ -f "$COPILOT_CLI_PATH" ]; then
plugins/azure-skills/skills/microsoft-foundry/foundry-agent/create/scripts/check-copilot-app-entry.sh:102
COPILOT_CLI_EXTRACT_DIR/copilotis only checked with-f, but the script executes it. Using-xhere prevents selecting a non-executable file and better matches the intent of locating an executable CLI.
if [ -n "${COPILOT_CLI_EXTRACT_DIR:-}" ] && [ -f "$COPILOT_CLI_EXTRACT_DIR/copilot" ]; then
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Description
python3dependency while preserving plugin detection[OK]result when the GitHub Copilot App is not detected