-
Notifications
You must be signed in to change notification settings - Fork 242
Fix Claude plugin marketplace and agent discovery #2272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,7 +9,8 @@ | |
| { | ||
| "name": "microsoft-finops-toolkit", | ||
| "version": "15.0.0", | ||
| "source": "./plugins/microsoft-finops-toolkit", | ||
| "source": "./src/templates/agent-plugin", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With both manifests now pointing here, the Separately, |
||
| "strict": true, | ||
| "description": "Microsoft FinOps toolkit plugin for AI-powered cloud financial management.", | ||
| "category": "finops", | ||
| "homepage": "https://aka.ms/finops/toolkit" | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,7 +34,7 @@ Describe 'Agent plugin manifest' { | |
| $root.agents | Should -Be './agents/' | ||
| $root.mcpServers | Should -Be '.mcp.json' | ||
| $claude.agents | Should -BeNullOrEmpty | ||
| $claude.mcpServers | Should -BeNullOrEmpty | ||
| $claude.mcpServers | Should -Be './.mcp.json' | ||
| $claude.outputStyles | Should -Be './output-styles/' | ||
| } | ||
|
|
||
|
|
@@ -48,11 +48,21 @@ Describe 'Agent plugin manifest' { | |
| $claude = Get-Content (Join-Path $script:Plugin '.claude-plugin/plugin.json') -Raw | ConvertFrom-Json | ||
|
|
||
| $root.mcpServers | Should -Be '.mcp.json' | ||
| $claude.mcpServers | Should -BeNullOrEmpty | ||
| $claude.agents | Should -BeNullOrEmpty | ||
| $claude.mcpServers | Should -Be './.mcp.json' | ||
| Join-Path $script:Plugin '.mcp.json' | Should -Exist | ||
| } | ||
|
|
||
| It 'Declares resolvable paths for every Claude component' { | ||
| $claude = Get-Content (Join-Path $script:Plugin '.claude-plugin/plugin.json') -Raw | ConvertFrom-Json | ||
| $paths = @($claude.commands) + @($claude.skills) + @($claude.mcpServers) + @($claude.outputStyles) | ||
|
|
||
| $paths.Count | Should -BeGreaterOrEqual 4 | ||
| $paths | ForEach-Object { | ||
| $_ | Should -Not -BeNullOrEmpty | ||
| Join-Path $script:Plugin $_ | Should -Exist | ||
| } | ||
| } | ||
|
MSBrett marked this conversation as resolved.
|
||
|
|
||
| It 'Uses unpinned Azure MCP latest package in .mcp.json' { | ||
| $mcp = Get-Content (Join-Path $script:Plugin '.mcp.json') -Raw | ConvertFrom-Json | ||
| $args = $mcp.mcpServers.'azure-mcp-server'.args | ||
|
|
@@ -64,13 +74,17 @@ Describe 'Agent plugin manifest' { | |
| } | ||
|
|
||
| Describe 'Agent plugin components' { | ||
| It 'Ships agent definitions as NAME.agent.md files' { | ||
| $agents = Get-ChildItem (Join-Path $script:Plugin 'agents') -Filter '*.agent.md' | ||
| $agents.Count | Should -BeGreaterThan 0 | ||
| It 'Ships agent definitions as Claude-compatible NAME.md files' { | ||
| $agents = Get-ChildItem (Join-Path $script:Plugin 'agents') -Filter '*.md' | ||
|
|
||
| $agents.Count | Should -Be 5 | ||
|
MSBrett marked this conversation as resolved.
Outdated
|
||
| $agents.Name | ForEach-Object { | ||
| $_ | Should -Not -Match '\.agent\.md$' | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This inverts the previous guard, so the If the rename is reverted, this assertion has to go with it. Worth keeping the naming change and its enforcement in the same commit either way, so CI never encodes a convention the plugin manifests contradict. |
||
| } | ||
| } | ||
|
|
||
| It 'Gives every agent a name and description in front matter' { | ||
| Get-ChildItem (Join-Path $script:Plugin 'agents') -Filter '*.agent.md' | ForEach-Object { | ||
| Get-ChildItem (Join-Path $script:Plugin 'agents') -Filter '*.md' | ForEach-Object { | ||
| $content = Get-Content $_.FullName -Raw | ||
| $content | Should -Match '(?ms)^---\s.*^name:\s*\S.*^description:\s*\S.*^---' | ||
| } | ||
|
|
@@ -167,7 +181,7 @@ Describe 'Plugin discovery and marketplaces' { | |
| It 'Uses repository-root-relative marketplace sources' { | ||
| $marketplaces = @{ | ||
| '.github/plugin/marketplace.json' = './plugins/microsoft-finops-toolkit' | ||
| '.claude-plugin/marketplace.json' = './plugins/microsoft-finops-toolkit' | ||
| '.claude-plugin/marketplace.json' = './src/templates/agent-plugin' | ||
|
MSBrett marked this conversation as resolved.
Outdated
|
||
| } | ||
|
|
||
| foreach ($marketplace in $marketplaces.Keys) | ||
|
|
@@ -177,4 +191,11 @@ Describe 'Plugin discovery and marketplaces' { | |
| $entry.source | Should -Be $marketplaces[$marketplace] | ||
| } | ||
| } | ||
|
|
||
| It 'Enables strict mode explicitly for the Claude plugin' { | ||
| $json = Get-Content (Join-Path $script:RepoRoot '.claude-plugin/marketplace.json') -Raw | ConvertFrom-Json | ||
| $entry = $json.plugins | Where-Object { $_.name -eq 'microsoft-finops-toolkit' } | ||
|
|
||
| $entry.strict | Should -BeTrue | ||
| } | ||
| } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Blocker β this rename, and the other four in |
Uh oh!
There was an error while loading. Please reload this page.