Skip to content

fix(nacos-skill): handle block-sequence arrays in SKILL.md frontmatter#1445

Open
sunwg2 wants to merge 1 commit into
agentscope-ai:mainfrom
sunwg2:fix/skills
Open

fix(nacos-skill): handle block-sequence arrays in SKILL.md frontmatter#1445
sunwg2 wants to merge 1 commit into
agentscope-ai:mainfrom
sunwg2:fix/skills

Conversation

@sunwg2
Copy link
Copy Markdown

@sunwg2 sunwg2 commented May 20, 2026

Nacos exports use multi-line - item syntax for array fields. The old normalizer concatenated items into an invalid scalar, causing SnakeYAML to throw "sequence entries are not allowed here in 'string'".

Collect - item lines into a list and emit them as an inline YAML array ["a", "b"]; strip YAML quoting from raw items via unquoteYamlString().

Closes #1438

AgentScope-Java Version

[The version of AgentScope-Java you are working on, e.g. 1.0.12, check your pom.xml dependency version or run mvn dependency:tree | grep agentscope-parent:pom(only mac/linux)]

Description

Fix #1438NacosSkillRepository crashes with
sequence entries are not allowed here in 'string' when a SKILL.md
exported from Nacos uses YAML block-sequence syntax for array fields
such as trigger_intents.

normalizeFoldedFlatYaml() was designed to fold indented continuation
lines back into the previous key's value. It had no awareness of YAML
block-sequence entry lines (- item), so it treated them as plain
continuation text and concatenated all items into a single invalid scalar:

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has been formatted with mvn spotless:apply
  • All tests are passing (mvn test)
  • Javadoc comments are complete and follow project conventions
  • Related documentation has been updated (e.g. links, examples, etc.)
  • Code is ready for review

Nacos exports use multi-line `- item` syntax for array fields. The old
normalizer concatenated items into an invalid scalar, causing SnakeYAML
to throw "sequence entries are not allowed here in 'string'".

Collect `- item` lines into a list and emit them as an inline YAML array
`["a", "b"]`; strip YAML quoting from raw items via unquoteYamlString().

Closes agentscope-ai#1438
@sunwg2 sunwg2 requested a review from a team May 20, 2026 03:01
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


sunwg2 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants