@pi-stef/superpowers-adapter 0.3.4 → 0.3.5
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/src/tools/skill.ts +36 -0
package/package.json
CHANGED
package/src/tools/skill.ts
CHANGED
|
@@ -107,6 +107,42 @@ export function discoverSkills(cwd: string): Map<string, SkillMeta> {
|
|
|
107
107
|
join(home, ".agents", "skills"),
|
|
108
108
|
];
|
|
109
109
|
|
|
110
|
+
// Add workspace package skills (monorepo pattern)
|
|
111
|
+
const packagesDir = join(cwd, "packages");
|
|
112
|
+
if (existsSync(packagesDir)) {
|
|
113
|
+
try {
|
|
114
|
+
const packages = readdirSync(packagesDir, { withFileTypes: true });
|
|
115
|
+
for (const pkg of packages) {
|
|
116
|
+
if (pkg.isDirectory()) {
|
|
117
|
+
const pkgSkillsDir = join(packagesDir, pkg.name, "skills");
|
|
118
|
+
if (existsSync(pkgSkillsDir)) {
|
|
119
|
+
skillPaths.push(pkgSkillsDir);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
} catch {
|
|
124
|
+
// Skip if can't read packages directory
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Add installed package skills (node_modules pattern)
|
|
129
|
+
const nodeModulesDir = join(cwd, "node_modules", "@pi-stef");
|
|
130
|
+
if (existsSync(nodeModulesDir)) {
|
|
131
|
+
try {
|
|
132
|
+
const packages = readdirSync(nodeModulesDir, { withFileTypes: true });
|
|
133
|
+
for (const pkg of packages) {
|
|
134
|
+
if (pkg.isDirectory()) {
|
|
135
|
+
const pkgSkillsDir = join(nodeModulesDir, pkg.name, "skills");
|
|
136
|
+
if (existsSync(pkgSkillsDir)) {
|
|
137
|
+
skillPaths.push(pkgSkillsDir);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
} catch {
|
|
142
|
+
// Skip if can't read node_modules directory
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
110
146
|
const gitPackagesDir = join(home, ".pi", "agent", "git");
|
|
111
147
|
if (existsSync(gitPackagesDir)) {
|
|
112
148
|
findSkillsDirs(gitPackagesDir, skillPaths);
|