feat(qwen): add ZERO-294 Qwen Code adapter#40
Closed
spencercharest wants to merge 1 commit into
Closed
Conversation
Collaborator
Author
|
Folded into #63 as a matrix entry ( |
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.
Summary
Subtask: ZERO-299 (Qwen Code adapter — Gemini-style extension with Claude-style hooks)
Adds a native Qwen Code extension overlay for Zero:
plugins/zero-qwen/qwen-extension.jsonwith Zero remote MCP, extension skill,/zerocommand, and QwenSessionStart/UserPromptSubmit/PreToolUsehooksplugins/zero-qwen/commands/zero.mdslash commandscripts/build-qwen.shto assembledist/zero-qwen/from the Qwen overlay plus the shared Zero skill and hooksscripts/build-gemini.shnow builds one combined release archive with bothgemini-extension.jsonandqwen-extension.jsonat the root, so the existing single GitHub Release asset can serve both Gemini CLI and Qwen Code1.3.3 -> 1.4.0across versioned plugin manifests viamake minorThis PR intentionally does not modify
guides/agent-install.md. Proposed runbook notes are documented below for the later agent-install rework.Official sources used
@qwen-code/qwen-code@0.18.0Install and update surfaces
Terminal install after this ships through the latest release asset:
Local development/install path verified in Docker:
The release archive path verified in Docker:
Proposed
guides/agent-install.mdnotesDo not apply in this PR. Suggested section for the later runbook rework:
~/.qwen/extensions/unless Qwen Code is configured with a different home directory. You have the
right directory when it contains
skills/zero/SKILL.md. Continue withStep 2 below.
Result:
zeroinstalled successfully at version1.4.0/zero, thezeroskill, and thezeroremote MCP serverqwen-extension.json,commands/zero.md,skills/zero/SKILL.md, and all three hook scriptsCombined release artifact install/load:
Result:
/zero, thezeroskill, and thezeroremote MCP servergemini-extension.jsonandqwen-extension.json, plus sharedskills/andhooks/Hook checks from the installed Qwen extension root:
Results:
@zeroxyz/cli@1.1.0hookSpecificOutput.additionalContextzero searchzero fetchQwen startup/debug check:
QWEN_CODE_DEBUG=1 QWEN_CODE_SUPPRESS_YOLO_WARNING=1 \ qwen --approval-mode yolo --max-wall-time 20 --output-format text \ --prompt "Reply with only QWEN_ZERO_SMOKE."Debug result:
[HOOK_REGISTRY] Hook registry initialized with 3 hook entriesprepare-zero-runnerran successfully forSessionStartzero-contextran successfully forUserPromptSubmit{"error":"invalid_token"}because the Zero account/profile was not authenticated in this environmentLocal checks
Results:
1.4.0Claude-style plugin compatibility and simpler install option
Full Claude Code plugin package support: No. Qwen Code follows the Gemini-style extension model with Qwen-specific config paths and hook names. It does not install Claude Code
.claude-pluginpackages directly.What this means for users:
End users should not run build scripts. The consumer path should be a prebuilt Qwen extension artifact or source install from the Zero plugins repo once published.
The intended simple install flow should look like a Qwen extension install/update, not a local build/copy flow, for example:
Verify the final command against the current Qwen extension CLI before marking the PR ready.
If the custom extension is too much maintenance, the alternative is to ship only Qwen-native skill/MCP/command snippets. That is simpler, but it gives up Claude-style plugin reuse because Qwen does not read
.claude-pluginpackages.GitHub Releases / no-build install check
Result: Yes, Qwen Code explicitly supports GitHub Releases with custom prebuilt archives. Source: Qwen's extension releasing docs say GitHub Releases can be used for faster installs, custom archives may be attached as assets, and custom archives are useful for larger repositories where the installable extension has a different layout from the repo.
Best no-build consumer path should mirror Gemini:
qwen extensions install https://github.com/officialzeroxyz/zero-plugins --auto-update # or, if using GitHub shorthand: qwen extensions install officialzeroxyz/zero-plugins --auto-updateRelease workflow target: add a Qwen release job analogous to
.github/workflows/release-gemini.ymlthat runsscripts/build-qwen.sh --tar zero-qwen.tar.gzand publishes a self-contained archive withqwen-extension.jsonat the archive root. Before shipping from the monorepo's sharedlatestrelease, verify Qwen's asset-selection behavior if multiple adapter assets exist on the same release; otherwise use a dedicated release tag/channel or dedicated distribution repo.PR status
Draft. Native Qwen install/load and hooks are verified in Docker, including the combined release artifact. Full Qwen-driven Zero E2E is blocked because Zero auth/MCP is not connected in this environment (
zero auth whoami --jsonreturnsAuthentication required; Qwen MCP discovery returnsinvalid_token). Move to ready after testing with an authenticated Zero profile and confirming the latest GitHub release install path after merge.