Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(nacos): Update NacosSkillRepository extension module version#1080

Merged
LearningGp merged 15 commits into
agentscope-ai:mainfrom
qiacheng7:main
Mar 31, 2026
Merged

feat(nacos): Update NacosSkillRepository extension module version#1080
LearningGp merged 15 commits into
agentscope-ai:mainfrom
qiacheng7:main

Conversation

@qiacheng7
Copy link
Copy Markdown
Contributor

Description

Background & motivation
Enable AgentScope-Java to load AI Skill packages from Nacos via AiService, aligned with AgentSkillRepository and AgentSkill, so teams using Nacos can host, version, or label skills in one place.

What changed

  • New module agentscope-extensions-nacos-skill: NacosSkillRepository implements AgentSkillRepository, downloads the skill ZIP through Nacos AiService (downloadSkillZip, downloadSkillZipByVersion, downloadSkillZipByLabel), then parses it with SkillUtil#createFromZip.
  • Version & label resolution: agentscope.nacos.skill.version / agentscope.nacos.skill.label from Properties, JVM system properties, or env vars (AGENTSCOPE_NACOS_SKILL_VERSION / AGENTSCOPE_NACOS_SKILL_LABEL); precedence is documented on the class.
  • Read-only semantics: getSkill, skillExists, getRepositoryInfo, getSource, isWriteable are implemented; list/write APIs (getAllSkillNames, getAllSkills, save, delete) are documented no-ops with warnings.
  • YAML frontmatter adaptation: Rewrites Nacos-exported SKILL.md frontmatter (indented continuation lines) so it matches AgentScope’s flat key: value parsing.
  • Build & distribution: Module is wired under agentscope-extensions-nacos, and included in agentscope-bom / agentscope-all for dependency alignment; nacos-client version is managed in the BOM.

How to test

  1. Format: mvn spotless:apply (whole repo or selected modules).
  2. Unit tests: mvn test -pl agentscope-extensions/agentscope-extensions-nacos/agentscope-extensions-nacos-skill.
  3. Optional integration: Use a real Nacos AI skill and AiService, build NacosSkillRepository(aiService, namespaceId, properties), call getSkill / skillExists; repeat with version or label properties set.

@qiacheng7 qiacheng7 requested a review from a team March 30, 2026 12:09
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 30, 2026

Codecov Report

❌ Patch coverage is 52.48619% with 86 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ntscope/core/nacos/skill/NacosSkillRepository.java 52.48% 56 Missing and 30 partials ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Collaborator

@LearningGp LearningGp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LearningGp LearningGp merged commit f090a05 into agentscope-ai:main Mar 31, 2026
5 of 6 checks passed
liangxingguang pushed a commit to liangxingguang/agentscope-java that referenced this pull request May 21, 2026
…entscope-ai#1080)

### Description

**Background & motivation**  
Enable AgentScope-Java to load AI Skill packages from Nacos via
`AiService`, aligned with `AgentSkillRepository` and `AgentSkill`, so
teams using Nacos can host, version, or label skills in one place.

**What changed**

- New module **`agentscope-extensions-nacos-skill`**:
`NacosSkillRepository` implements `AgentSkillRepository`, downloads the
skill ZIP through Nacos `AiService` (`downloadSkillZip`,
`downloadSkillZipByVersion`, `downloadSkillZipByLabel`), then parses it
with `SkillUtil#createFromZip`.
- **Version & label resolution**: `agentscope.nacos.skill.version` /
`agentscope.nacos.skill.label` from `Properties`, JVM system properties,
or env vars (`AGENTSCOPE_NACOS_SKILL_VERSION` /
`AGENTSCOPE_NACOS_SKILL_LABEL`); precedence is documented on the class.
- **Read-only semantics**: `getSkill`, `skillExists`,
`getRepositoryInfo`, `getSource`, `isWriteable` are implemented;
list/write APIs (`getAllSkillNames`, `getAllSkills`, `save`, `delete`)
are documented no-ops with warnings.
- **YAML frontmatter adaptation**: Rewrites Nacos-exported `SKILL.md`
frontmatter (indented continuation lines) so it matches AgentScope’s
flat `key: value` parsing.
- **Build & distribution**: Module is wired under
`agentscope-extensions-nacos`, and included in `agentscope-bom` /
`agentscope-all` for dependency alignment; `nacos-client` version is
managed in the BOM.

**How to test**

1. Format: `mvn spotless:apply` (whole repo or selected modules).
2. Unit tests: `mvn test -pl
agentscope-extensions/agentscope-extensions-nacos/agentscope-extensions-nacos-skill`.
3. Optional integration: Use a real Nacos AI skill and `AiService`,
build `NacosSkillRepository(aiService, namespaceId, properties)`, call
`getSkill` / `skillExists`; repeat with version or label properties set.
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.

2 participants