Add Qwen Code support - #157
Conversation
Reviewer's GuideAdds Qwen Code 0.22.3 support as a detected, config-driven managed harness, integrating canonical skills, native Markdown roles, MCP, hooks, and QWEN.md root instructions while preserving existing settings; focused unit and end-to-end tests and documentation cover the implementation. Sequence diagram for Qwen Code setup and syncsequenceDiagram
participant User
participant Dotagents as dotagents
participant Settings as ~/.qwen/settings.json
participant Skills as ~/.agents/skills
participant Roles as ~/.qwen/agents
participant Qwen as Qwen Code
User->>Dotagents: setup
Dotagents->>Settings: patchQwenConfig
Settings-->>Dotagents: skills.directories configured
User->>Dotagents: sync
Dotagents->>Roles: renderQwenAgentRole
Dotagents->>Settings: patchJSONMCPServer
Dotagents->>Settings: patchQwenHook
Dotagents->>Qwen: link QWEN.md
Qwen->>Skills: load configured skill directory
Qwen->>Roles: load Markdown roles
Qwen->>Settings: read MCP servers and hooks
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've reviewed your changes and they look great!
Sourcery assessment
Needs a human reviewer. If the Qwen adapter is wrong, it can leave incorrect skills, MCP, role, root-instruction, or hook settings persisted in ~/.qwen/settings.json after the code is reverted; in particular, a timeout conversion or config patch could change how an existing hook runs. The affected configuration is bounded and can be corrected or regenerated, so a rerun or manual cleanup repairs it.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 695abe22b1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| read: readJSONMCPServer, | ||
| rootKey: "mcpServers", | ||
| }), | ||
| Roles: &RolesCapability{Extension: ".md", Render: renderQwenAgentRole}, |
There was a problem hiding this comment.
Preserve imported Qwen roles before enabling role sync
When first-run setup shares an existing ~/.qwen/agents/<name>.md, this capability causes scanNativeRoles to use the generic Markdown importer, which copies native top-level fields such as model, tools, and approvalMode into the canonical file. renderQwenAgentRole instead expects nested qwen options and adds generated metadata, so the expected output differs from the untouched native source; the first sync then classifies that source as an unmanaged conflict and aborts. Add a Qwen-specific conversion that preserves those native fields in canonical qwen options so importing an existing Qwen role can complete.
AGENTS.md reference: AGENTS.md:L17-L19
Useful? React with 👍 / 👎.
Summary
skills.directories, roles under~/.qwen/agents, MCP and hooks insettings.json, and root instructions throughQWEN.mdVerification
go test ./...dotagents setup,sync, andstatusagainst Qwen Code 0.22.3mcp listread the generated MCP entry; Qwen startup loaded generated skills, roles, hooks, and root instructions without schema errorsLocal limitation
401 invalid access token or token expiredeven outside the isolated testSummary by Sourcery
Add verified Qwen Code support across the dotagents setup, sync, and status workflows.
New Features:
Enhancements:
Documentation:
Tests: