Skip to content

Fix issue 1158#1185

Open
xuhuafeifei wants to merge 3 commits intoagentscope-ai:mainfrom
xuhuafeifei:fix_issue_1158
Open

Fix issue 1158#1185
xuhuafeifei wants to merge 3 commits intoagentscope-ai:mainfrom
xuhuafeifei:fix_issue_1158

Conversation

@xuhuafeifei
Copy link
Copy Markdown
Contributor

AgentScope-Java Version

io.agentscope:agentscope-parent:pom:1.0.12-SNAPSHOT

Description

Background

Some skill repositories (for example Nacos) encode the skill source with a colon, such as nacos:public. AgentSkill#getSkillId()
is built as name + "_" + source, so the id can contain :. On Windows, : is not allowed in a normal path segment, so
SkillBox#uploadSkillFiles() could fail to write resources when it used Path#resolve(skillId) as a directory name.

Solution

Keep logical identifiers (getSource(), getSkillId()) unchanged, while making filesystem paths used during skill file upload safe
on Windows (and generally for reserved filename characters).

Checklist

• Add SkillBox.unifyToSafeSkillId to normalize characters that are invalid in file names (\ / : * ? " < > |) to _, with a small
fallback for blank ids.
• Use the normalized id only when constructing upload directory paths inuploadSkillFiles().

  • 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

@xuhuafeifei xuhuafeifei requested a review from a team April 9, 2026 17:27
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant