Add Qwen Code support to convert.sh and install.sh
- Add convert_qwen() to scripts/convert.sh for generating Qwen SubAgent .md files - Add install_qwen() to scripts/install.sh for installing to .qwen/agents/ (project-scoped) - Add qwen detection, tool label, and install cases - Update README.md with Qwen in supported tools table + usage section - Add integrations/qwen/agents/ to .gitignore + create .gitkeep - Add Qwen Code compatibility note to CONTRIBUTING.md - Preserve tools: field in Qwen output when present in source agents - Fix interactive installer to show dynamic [1-N] toggle range - Update README roadmap checklist to include Qwen Code Qwen SubAgents use minimal YAML frontmatter (name, description) with optional tools: field preserved from source. Body content passes through unchanged. Tested with 120 agents — all convert and install successfully.
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
# aider — Single CONVENTIONS.md for Aider
|
||||
# windsurf — Single .windsurfrules for Windsurf
|
||||
# openclaw — OpenClaw SOUL.md files (openclaw_workspace/<agent>/SOUL.md)
|
||||
# qwen — Qwen Code SubAgent files (~/.qwen/agents/*.md)
|
||||
# all — All tools (default)
|
||||
#
|
||||
# Output is written to integrations/<tool>/ relative to the repo root.
|
||||
@@ -297,6 +298,41 @@ HEREDOC
|
||||
fi
|
||||
}
|
||||
|
||||
convert_qwen() {
|
||||
local file="$1"
|
||||
local name description tools slug outfile body
|
||||
|
||||
name="$(get_field "name" "$file")"
|
||||
description="$(get_field "description" "$file")"
|
||||
tools="$(get_field "tools" "$file")"
|
||||
slug="$(slugify "$name")"
|
||||
body="$(get_body "$file")"
|
||||
|
||||
outfile="$OUT_DIR/qwen/agents/${slug}.md"
|
||||
mkdir -p "$(dirname "$outfile")"
|
||||
|
||||
# Qwen Code SubAgent format: .md with YAML frontmatter in ~/.qwen/agents/
|
||||
# name and description required; tools optional (only if present in source)
|
||||
if [[ -n "$tools" ]]; then
|
||||
cat > "$outfile" <<HEREDOC
|
||||
---
|
||||
name: ${slug}
|
||||
description: ${description}
|
||||
tools: ${tools}
|
||||
---
|
||||
${body}
|
||||
HEREDOC
|
||||
else
|
||||
cat > "$outfile" <<HEREDOC
|
||||
---
|
||||
name: ${slug}
|
||||
description: ${description}
|
||||
---
|
||||
${body}
|
||||
HEREDOC
|
||||
fi
|
||||
}
|
||||
|
||||
# Aider and Windsurf are single-file formats — accumulate into temp files
|
||||
# then write at the end.
|
||||
AIDER_TMP="$(mktemp)"
|
||||
@@ -393,6 +429,7 @@ run_conversions() {
|
||||
opencode) convert_opencode "$file" ;;
|
||||
cursor) convert_cursor "$file" ;;
|
||||
openclaw) convert_openclaw "$file" ;;
|
||||
qwen) convert_qwen "$file" ;;
|
||||
aider) accumulate_aider "$file" ;;
|
||||
windsurf) accumulate_windsurf "$file" ;;
|
||||
esac
|
||||
@@ -428,7 +465,7 @@ main() {
|
||||
esac
|
||||
done
|
||||
|
||||
local valid_tools=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "all")
|
||||
local valid_tools=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "qwen" "all")
|
||||
local valid=false
|
||||
for t in "${valid_tools[@]}"; do [[ "$t" == "$tool" ]] && valid=true && break; done
|
||||
if ! $valid; then
|
||||
@@ -444,7 +481,7 @@ main() {
|
||||
|
||||
local tools_to_run=()
|
||||
if [[ "$tool" == "all" ]]; then
|
||||
tools_to_run=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw")
|
||||
tools_to_run=("antigravity" "gemini-cli" "opencode" "cursor" "aider" "windsurf" "openclaw" "qwen")
|
||||
else
|
||||
tools_to_run=("$tool")
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user