Skip to content

[Bug] NacosSkillRepository: colon in source/location breaks Path on Windows; #1158

@dragondyt

Description

@dragondyt

Describe the bug
NacosSkillRepository builds string fields such as source and location using a pattern like REPO_TYPE + ":" + namespaceId (e.g. nacos:). On Windows, when these values are used as part of a local filesystem path (e.g. with Path.resolve), the colon is not allowed in a path segment (except for a drive letter), which leads to java.nio.file.InvalidPathException.

To Reproduce
Steps to reproduce the behavior:

On Windows, use AgentScope-Java with the Nacos skill extension and construct NacosSkillRepository with a valid AiService and namespace.
Load skills from Nacos in a flow that writes or resolves skill resources under a directory derived from the repository’s identity strings (source / location).
The process fails with InvalidPathException due to an illegal : in the path string.
Expected behavior
Repository identity strings that participate in filesystem paths should be valid path segments on Windows, so skill loading works without InvalidPathException.

Error messages
java.nio.file.InvalidPathException: Illegal char <:> at index :
(Exact segment text may vary; it typically includes the colon from nacos:-style values.)

Environment (please complete the following information)
AgentScope-Java Version: 1.0.11
Java Version: 25
OS: Windows
Additional context
In NacosSkillRepository (1.0.11), source and location are both assigned in the constructor from concatenations that include : between the repository type and the namespace id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions