Skip to content

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

Open
sunwg2 wants to merge 2 commits into
agentscope-ai:mainfrom
sunwg2:fix/skills
Open

fix(nacos-skill): handle block-sequence arrays in SKILL.md frontmatter#1445
sunwg2 wants to merge 2 commits 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

@sunwg2 sunwg2 requested a review from a team May 20, 2026 03:01
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 20, 2026

CLA assistant check
All committers have signed the CLA.

@LearningGp
Copy link
Copy Markdown
Collaborator

image

@AgentScopeJavaBot AgentScopeJavaBot added bug Something isn't working area/ext/integration External protocols & middleware integrations labels May 28, 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 agentscope-ai#1438
@sunwg2
Copy link
Copy Markdown
Author

sunwg2 commented May 29, 2026

recheck

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

Labels

area/ext/integration External protocols & middleware integrations bug Something isn't working

Projects

None yet

4 participants