@keighleykodric/weeve 0.1.3 → 0.1.4
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/bin/weeve.js +11 -22
- package/package.json +1 -1
package/bin/weeve.js
CHANGED
|
@@ -82,31 +82,20 @@ function runGlobal(command) {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
const LOCK_PATH = path.join(os.homedir(), ".claude", "skills-lock.json");
|
|
85
|
+
const SKILLS_DIR = path.join(os.homedir(), ".agents", "skills");
|
|
87
86
|
|
|
88
|
-
|
|
89
|
-
if (!fs.existsSync(LOCK_PATH)) return null;
|
|
90
|
-
try {
|
|
91
|
-
return JSON.parse(fs.readFileSync(LOCK_PATH, "utf8"));
|
|
92
|
-
} catch {
|
|
93
|
-
console.error(`Could not parse ${LOCK_PATH}`);
|
|
94
|
-
process.exit(1);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// Return installed weeve lanes from the lock file { lane: { count, source } }
|
|
87
|
+
// Return installed weeve lanes by scanning ~/.agents/skills/ for known lane dirs
|
|
99
88
|
function installedLanes() {
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
if (!fs.existsSync(SKILLS_DIR)) return {};
|
|
90
|
+
const entries = new Set(fs.readdirSync(SKILLS_DIR));
|
|
102
91
|
const laneMap = {};
|
|
103
|
-
for (const
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
laneMap[lane]
|
|
92
|
+
for (const lane of Object.keys(LANES)) {
|
|
93
|
+
if (entries.has(lane)) {
|
|
94
|
+
// Count all skill dirs that start with this lane name
|
|
95
|
+
const count = [...entries].filter(
|
|
96
|
+
(e) => e === lane || e.startsWith(lane + "-")
|
|
97
|
+
).length;
|
|
98
|
+
laneMap[lane] = { count, source: `keighleykodric/weeve-${lane}` };
|
|
110
99
|
}
|
|
111
100
|
}
|
|
112
101
|
return laneMap;
|