Skip to content

fix(nacos): make skill source paths Windows-safe - #2921

Merged
jujn merged 1 commit into
agentscope-ai:mainfrom
dragondyt:fix/nacos-windows-skill-source
Sep 1, 2026
Merged

jujn merged 1 commit into
agentscope-ai:mainfrom
dragondyt:fix/nacos-windows-skill-source

Conversation

@dragondyt

Copy link
Copy Markdown
Contributor

AgentScope-Java Version

2.0.3-SNAPSHOT

Description

Background

NacosSkillRepository used nacos:<namespaceId> as its source identifier. AgentSkill#getSkillId() includes that source, and SkillBox#uploadSkillFiles() uses the resulting skill ID as a directory name. On Windows, the embedded : is illegal inside a path segment, so skills containing additional resources fail with InvalidPathException during materialization.

Changes

  • Replace the Nacos source separator with @, producing identifiers such as nacos@public.
  • Keep namespace IDs containing - or _ distinct and unchanged.
  • Add a regression test that loads a Nacos skill ZIP with scripts/run.sh, registers it in SkillBox, and verifies that the resource is actually written to disk.
  • Update source assertions for the new identifier format.

Why this approach

@ is valid in file names on Windows, Linux, and macOS, while remaining visually distinct from the - and _ characters commonly present in Nacos namespace IDs. Fixing the source identifier addresses the complete failure chain without changing the generic skill ID or resource-upload behavior.

Test

mvn -pl agentscope-extensions/agentscope-extensions-nacos/agentscope-extensions-nacos-skill -am test -Dtest=NacosSkillRepositoryTest -DfailIfNoTests=false

Result: 36 tests passed.

Closes #1158
Closes #1339
Related to #842

Checklist

  • Code has been formatted with mvn spotless:apply
  • All relevant tests are passing
  • Javadoc comments are complete and follow project conventions
  • Related documentation is not required for this internal identifier fix
  • Code is ready for review

Use a cross-platform source separator so Nacos skill resources can be materialized by SkillBox on Windows.
@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@jujn
jujn merged commit 9afbe5f into agentscope-ai:main Sep 1, 2026
5 checks passed
@dragondyt
dragondyt deleted the fix/nacos-windows-skill-source branch September 1, 2026 13:42
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