ai-agent-config 2.2.0 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/installer.js +9 -3
package/package.json
CHANGED
package/scripts/installer.js
CHANGED
|
@@ -80,12 +80,13 @@ function isRepoCached() {
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
|
-
* Get list of available skills
|
|
83
|
+
* Get list of available skills
|
|
84
|
+
* Priority: Package bundled skills > External repo cache
|
|
84
85
|
*/
|
|
85
86
|
function getAvailableSkills() {
|
|
86
87
|
const skills = new Set();
|
|
87
88
|
|
|
88
|
-
//
|
|
89
|
+
// Try package bundled skills first (.agent/skills/)
|
|
89
90
|
if (fs.existsSync(PACKAGE_SKILLS_DIR)) {
|
|
90
91
|
const packageSkills = fs.readdirSync(PACKAGE_SKILLS_DIR);
|
|
91
92
|
packageSkills.forEach((name) => {
|
|
@@ -95,9 +96,14 @@ function getAvailableSkills() {
|
|
|
95
96
|
skills.add(name);
|
|
96
97
|
}
|
|
97
98
|
});
|
|
99
|
+
|
|
100
|
+
// If package has bundled skills, return only those (don't merge with cache)
|
|
101
|
+
if (skills.size > 0) {
|
|
102
|
+
return Array.from(skills);
|
|
103
|
+
}
|
|
98
104
|
}
|
|
99
105
|
|
|
100
|
-
// Get skills from repo cache
|
|
106
|
+
// Fallback: Get skills from external repo cache (only if no package skills)
|
|
101
107
|
if (fs.existsSync(REPO_SKILLS_DIR)) {
|
|
102
108
|
fs.readdirSync(REPO_SKILLS_DIR).forEach((name) => {
|
|
103
109
|
const skillPath = path.join(REPO_SKILLS_DIR, name);
|