Refactor agent environment scanners and add standard location support#15022
Refactor agent environment scanners and add standard location support#15022
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15022Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15022" |
There was a problem hiding this comment.
Pull request overview
Refactors agent-environment scanning to centralize skill-file provisioning and adds support for an “industry-standard” .agents/skills/ location, including a new dotnet-inspect skill and updated Aspire skill content.
Changes:
- Add a new
StandardLocationAgentEnvironmentScannerthat registers workspace + user (~).agents/skills/skill applicators. - Extend
CommonAgentApplicators.TryAddSkillFileApplicatorto support custom skill content and configurable deduplication keys; adddotnet-inspectskill content. - Remove per-environment Aspire skill-file creation from existing scanners (Copilot CLI / VS Code / Claude / OpenCode) and add/adjust tests accordingly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Aspire.Cli.Tests/Agents/StandardLocationAgentEnvironmentScannerTests.cs | Adds coverage for .agents/skills workspace + user locations and update/no-op behavior. |
| tests/Aspire.Cli.Tests/Agents/OpenCodeAgentEnvironmentScannerTests.cs | Updates tests for OpenCode scanner constructor changes. |
| tests/Aspire.Cli.Tests/Agents/CopilotCliAgentEnvironmentScannerTests.cs | Removes assumptions about .github/skills Aspire skill generation in Copilot scanner tests. |
| tests/Aspire.Cli.Tests/Agents/CommonAgentApplicatorsTests.cs | Adds tests for custom content, deduplication keys, and standard location applicators. |
| src/Aspire.Cli/Program.cs | Registers the new StandardLocationAgentEnvironmentScanner. |
| src/Aspire.Cli/Agents/VsCode/VsCodeAgentEnvironmentScanner.cs | Stops adding Aspire skill-file applicators in VS Code scanning paths. |
| src/Aspire.Cli/Agents/StandardLocationAgentEnvironmentScanner.cs | New scanner that adds standard .agents/skills skill applicators. |
| src/Aspire.Cli/Agents/OpenCode/OpenCodeAgentEnvironmentScanner.cs | Removes OpenCode-specific skill file creation; updates constructor signature. |
| src/Aspire.Cli/Agents/CopilotCli/CopilotCliAgentEnvironmentScanner.cs | Stops adding Aspire skill-file applicators. |
| src/Aspire.Cli/Agents/CommonAgentApplicators.cs | Adds dotnet-inspect skill content + standard-location helper; extends skill applicator creation to support custom content/dedup keys; updates Aspire skill guidance. |
| src/Aspire.Cli/Agents/ClaudeCode/ClaudeCodeAgentEnvironmentScanner.cs | Stops adding Aspire skill-file applicators. |
You can also share your feedback on Copilot code review. Take the survey.
|
@IEvangelist Did you test this with codex, copilot cli and claude code? Those are the primary 3 that we need to make sure works with this. |
I'm going to test it, converted to draft. I was also going to play around with attempting to scope it to Aspire APIs. |
e6c9cc9 to
c05da0f
Compare
|
@IEvangelist is this ready to review? |
It has been ready for review...I can close this as it seems like it might not be something we want. |
|
I think we want this. |
Hey @davidfowl - this is ready to go. |
|
The transient CI rerun workflow requested reruns for the following jobs after analyzing the failed attempt.
|
* feat: enhance Playwright CLI installation process with improved error handling and cleanup logic * fix: improve error handling and cleanup in Playwright CLI installation process
…atus enum, improve error handling and messaging (#15356)
…#15386) * Initial plan * Fix missing DI registrations for PlaywrightCliInstaller in test setup Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: IEvangelist <7679720+IEvangelist@users.noreply.github.com>
Co-authored-by: James Newton-King <james@newtonking.com>
- Remove accidental Debugger.Launch() and unused System.Diagnostics import from AgentInitCommand - Remove dead InitCommand_NothingSelected and InitCommand_InstallSkillFile resource strings from .resx, .Designer.cs, and all 13 xlf files - Split platform-agnostic NpmRunnerTests empty-args test into Windows (.cmd) and non-Windows variants
The Sigstore .NET library v0.4.0 ExtractSan() method fails on Windows because .NET formats URI-type SANs as 'URL=...' but the library checks for 'URI'. This causes CertificateIdentity.ForGitHubActions() to always fail with 'Could not extract Subject Alternative Name'. When the known SAN failure is detected, retry cryptographic verification without CertificateIdentity, then manually verify the three identity checks (OIDC issuer, SourceRepositoryUri, SAN pattern) by reading Fulcio certificate extensions directly from the bundle. This is safe because the full crypto chain (Fulcio CA, SCT, Rekor, artifact signature) is still verified, and Fulcio extensions are parsed from raw DER bytes (not the platform-dependent Format method). Will be removed when upgrading to Sigstore 0.5.0 which fixes the upstream bug: mitchdenny/sigstore-dotnet#14 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix extra leading whitespace in VerifyCertificateIdentityFromBundle - Add comment documenting PayloadDecodeFailed -> AttestationParseFailed change - Extract ParseUriFromFormattedSan as internal static for testability - Add unit tests for SAN parsing (URI/URL formats, multi-entry, certs) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🎬 CLI E2E Test Recordings — 49 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23520998239 |






Description
.agents/based skill.aspireskill to reflect latest changes to CLI./modules/*context for TS polyglot AppHostdotnet inspectskillIn this PR, regardless of whether someone explicitly calls
agent initor they accept the template question to include AI, the flow is as follows:Also, fixes a bug where the playwright-cli was never installing on Windows.
Select AI environment locations
Select skills/MCP bits
Resulting bits on disk
Other considerations not in this PR, remove vendor specific skills.
Fixes #14885
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: