@pi-stef/superpowers-adapter 0.3.3 → 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.
Files changed (2) hide show
  1. package/package.json +7 -1
  2. package/src/tools/skill.ts +36 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pi-stef/superpowers-adapter",
3
- "version": "0.3.3",
3
+ "version": "0.3.5",
4
4
  "description": "Bridges the superpowers skill system to pi's extension API with TodoWrite, Task, and Skill tools.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -8,6 +8,12 @@
8
8
  "superpowers"
9
9
  ],
10
10
  "license": "MIT",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/sfiorini/pi-stef.git",
14
+ "directory": "packages/superpowers-adapter"
15
+ },
16
+ "homepage": "https://sfiorini.github.io/pi-stef/packages/superpowers-adapter.html",
11
17
  "type": "module",
12
18
  "main": "./src/index.ts",
13
19
  "files": [
@@ -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);