Repository navigation
feat(extensions): support Agent Plugins v1 #8834
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
Merged
Merged
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| # Agent Plugins v1 Native Support | ||
|
|
||
| ## Context | ||
|
|
||
| Qwen Code currently loads `qwen-extension.json` packages directly and converts | ||
| Gemini, Claude, and Qoder packages before loading them. Agent Plugins v1 is a | ||
| portable format with a root `plugin.json`, direct-child skills under `skills/`, | ||
| and an optional root `mcp.json`. Converting it would change the package format | ||
| and its runtime semantics. | ||
|
|
||
| This design matches the portable runtime capabilities implemented by Codex at | ||
| `646f7c0a91b8e327d263335da68ae8ef212895ce`: skills, stdio MCP, and Streamable | ||
| HTTP MCP. Agent Plugin commands, agents, hooks, context, settings, channels, | ||
| apps, client-extension namespaces, and legacy SSE MCP are not activated. | ||
|
|
||
| ## Design | ||
|
|
||
| Agent Plugins v1 is a native extension package format, not another converter. | ||
| A format-aware manifest loader recognizes only the canonical v1 schema, maps | ||
| portable metadata into the existing in-memory `ExtensionConfig`, and leaves all | ||
| standard files unchanged. Existing install sources and the install metadata | ||
| sidecar remain unchanged. | ||
|
|
||
| The Agent Plugin loader discovers only immediate `skills/*/SKILL.md` files and | ||
| validates their portable Agent Skills metadata. Invalid skills are skipped | ||
| independently. The optional `allowed-tools` field is validated but does not | ||
| grant Qwen permissions. Other Qwen-specific skill fields are ignored. | ||
|
|
||
| The root `mcp.json` is validated in two stages. A top-level error disables MCP | ||
| for the plugin; an invalid server disables only that entry. Stdio servers use a | ||
| stable data directory outside the package and receive client-controlled | ||
| `PLUGIN_ROOT` and `PLUGIN_DATA` values. Streamable HTTP servers receive the | ||
| portable URL and literal-header checks and stop redirects when a configured or | ||
| authorization header is present. Legacy SSE entries are reported and skipped. | ||
|
|
||
| ## Package boundary | ||
|
|
||
| Every discovered, read, or executed package path is checked after resolving | ||
| symlinks and existing path prefixes. A plugin manifest escape rejects the | ||
| plugin, a component-directory escape disables that component, and a skill or | ||
| MCP-entry escape skips only that entry. Copied Agent Plugin installs do not | ||
| follow symlinks; linked installs apply the same checks at load time. | ||
|
|
||
| ## Compatibility | ||
|
|
||
| A root `plugin.json` whose schema belongs to Agent Plugins takes precedence | ||
| over other extension manifests. Unsupported Agent Plugins schema versions fail | ||
| explicitly; unrelated root `plugin.json` files do not affect existing format | ||
| detection. Missing or blank portable versions use the internal version | ||
| `1.0.0`. | ||
|
|
||
| The shared origin union gains `AgentPlugins`. Native Agent Plugins still use | ||
| the normal extension security consent, but they do not show the converted | ||
| third-party-format compatibility warning. Existing Qwen, Gemini, Claude, and | ||
| Qoder behavior remains unchanged. |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Agent Plugins v1 | ||
|
|
||
| Qwen Code natively loads portable [Agent Plugins v1](https://agent-plugins.org/) | ||
| packages. The package keeps its standard `plugin.json`, `mcp.json`, and | ||
| `SKILL.md` files: installation does not generate `qwen-extension.json` or | ||
| rewrite portable files. | ||
|
|
||
| Use the existing extension commands with a local directory, link, archive, | ||
| Git repository, archive URL, or scoped npm package: | ||
|
|
||
| ```bash | ||
| qwen extensions install ./my-agent-plugin | ||
| qwen extensions link ./my-agent-plugin | ||
| qwen extensions install owner/my-agent-plugin | ||
| ``` | ||
|
|
||
| The root manifest must target the canonical v1 schema: | ||
|
|
||
| ```json | ||
| { | ||
| "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json", | ||
| "name": "my-agent-plugin", | ||
| "version": "1.0.0" | ||
| } | ||
| ``` | ||
|
|
||
| ## Supported capabilities | ||
|
|
||
| | Capability | Support | | ||
| | ------------------------------------------ | ---------------------------------------- | | ||
| | Direct-child `skills/*/SKILL.md` | Yes | | ||
| | stdio MCP servers | Yes | | ||
| | Streamable HTTP MCP servers | Yes | | ||
| | Legacy HTTP+SSE MCP servers | No; the entry is skipped | | ||
| | Commands, agents, and hooks | No; these directories are ignored | | ||
| | Qwen context, settings, channels, and apps | No | | ||
| | `extensions.*` client namespaces | No; unimplemented namespaces are ignored | | ||
|
|
||
| Skills follow the [Agent Skills specification](https://agentskills.io/specification). | ||
| An invalid skill is skipped without disabling valid sibling skills. The | ||
| experimental `allowed-tools` field is recognized as a string but does not grant | ||
| pre-approved Qwen tools. | ||
|
|
||
| For stdio MCP servers, Qwen Code expands `${PLUGIN_ROOT}` and `${PLUGIN_DATA}` | ||
| once in `args`, environment values, and `cwd`. `PLUGIN_DATA` is a writable | ||
| per-installation directory whose contents persist across updates and reinstall. | ||
| Remote MCP endpoints must use HTTPS, except for loopback HTTP endpoints. | ||
|
|
||
| Agent Plugins v1 is a package format, not a marketplace integration. Install | ||
| packages through Qwen Code's existing extension sources. |
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
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
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
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
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * @license | ||
| * Copyright 2026 Qwen Team | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| export * from './manifest.js'; | ||
| export * from './mcp.js'; | ||
| export * from './skills.js'; |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.