@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.
Files changed (2) hide show
  1. package/bin/weeve.js +11 -22
  2. package/package.json +1 -1
package/bin/weeve.js CHANGED
@@ -82,31 +82,20 @@ function runGlobal(command) {
82
82
  }
83
83
  }
84
84
 
85
- // Lock file written by the skills CLI — lives in ~/.claude/ regardless of cwd
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
- function readLock() {
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
- const lock = readLock();
101
- if (!lock) return {};
89
+ if (!fs.existsSync(SKILLS_DIR)) return {};
90
+ const entries = new Set(fs.readdirSync(SKILLS_DIR));
102
91
  const laneMap = {};
103
- for (const [skillName, skillData] of Object.entries(lock.skills || {})) {
104
- const source = skillData.source || "";
105
- const match = source.match(/^keighleykodric\/weeve-(.+)$/);
106
- if (match) {
107
- const lane = match[1];
108
- if (!laneMap[lane]) laneMap[lane] = { count: 0, source };
109
- laneMap[lane].count++;
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keighleykodric/weeve",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Cross-functional contract framework — install and manage Weeve lanes",
5
5
  "bin": {
6
6
  "weeve": "./bin/weeve.js"