fix(nacos-skill): handle block-sequence arrays in SKILL.md frontmatter#1445
Open
sunwg2 wants to merge 1 commit into
Open
fix(nacos-skill): handle block-sequence arrays in SKILL.md frontmatter#1445sunwg2 wants to merge 1 commit into
sunwg2 wants to merge 1 commit into
Conversation
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 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nacos exports use multi-line
- itemsyntax 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
- itemlines 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 #1438 —
NacosSkillRepositorycrashes withsequence entries are not allowed here in 'string'when aSKILL.mdexported from Nacos uses YAML block-sequence syntax for array fields
such as
trigger_intents.normalizeFoldedFlatYaml()was designed to fold indented continuationlines back into the previous key's value. It had no awareness of YAML
block-sequence entry lines (
- item), so it treated them as plaincontinuation text and concatenated all items into a single invalid scalar:
Checklist
Please check the following items before code is ready to be reviewed.
mvn spotless:applymvn test)