Commit f090a05
authored
feat(nacos): Update NacosSkillRepository extension module version (#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.1 parent 080f5bf commit f090a05
5 files changed
Lines changed: 607 additions & 388 deletions
File tree
- agentscope-dependencies-bom
- agentscope-extensions/agentscope-extensions-nacos/agentscope-extensions-nacos-skill/src
- main/java/io/agentscope/core/nacos/skill
- test/java/io/agentscope/core/nacos/skill
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
0 commit comments