claude-recall 0.8.26 → 0.8.28

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-recall",
3
- "version": "0.8.26",
3
+ "version": "0.8.28",
4
4
  "description": "Persistent memory for Claude Code with fire-and-forget PubNub architecture, automatic capture, failure learning, and project scoping via MCP server",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -5,6 +5,28 @@ const path = require('path');
5
5
 
6
6
  console.log('\nšŸ“‹ Setting up .claude/ directory structure...\n');
7
7
 
8
+ /**
9
+ * Recursively copy a directory
10
+ */
11
+ function copyDirRecursive(src, dest) {
12
+ if (!fs.existsSync(dest)) {
13
+ fs.mkdirSync(dest, { recursive: true });
14
+ }
15
+
16
+ const entries = fs.readdirSync(src, { withFileTypes: true });
17
+
18
+ for (const entry of entries) {
19
+ const srcPath = path.join(src, entry.name);
20
+ const destPath = path.join(dest, entry.name);
21
+
22
+ if (entry.isDirectory()) {
23
+ copyDirRecursive(srcPath, destPath);
24
+ } else {
25
+ fs.copyFileSync(srcPath, destPath);
26
+ }
27
+ }
28
+ }
29
+
8
30
  /**
9
31
  * Find the project root by traversing up from node_modules/claude-recall/scripts/
10
32
  * This is more reliable than process.cwd() during npm install
@@ -120,22 +142,11 @@ try {
120
142
  console.log(' āš ļø Warning: SKILL.md not found in source');
121
143
  }
122
144
 
123
- // Copy reference files
145
+ // Copy reference files (recursively to include subdirectories like devops/)
124
146
  const sourceReferencesDir = path.join(sourceSkillsDir, 'memory-management', 'references');
125
147
  if (fs.existsSync(sourceReferencesDir)) {
126
- const refFiles = fs.readdirSync(sourceReferencesDir).filter(f => f.endsWith('.md'));
127
- let copiedCount = 0;
128
- refFiles.forEach(file => {
129
- const sourcePath = path.join(sourceReferencesDir, file);
130
- const destPath = path.join(referencesDir, file);
131
- if (!fs.existsSync(destPath) && fs.statSync(sourcePath).isFile()) {
132
- fs.copyFileSync(sourcePath, destPath);
133
- copiedCount++;
134
- }
135
- });
136
- if (copiedCount > 0) {
137
- console.log(` āœ… Created .claude/skills/memory-management/references/ (${copiedCount} file${copiedCount > 1 ? 's' : ''})`);
138
- }
148
+ copyDirRecursive(sourceReferencesDir, referencesDir);
149
+ console.log(' āœ… Created .claude/skills/memory-management/references/ (including subdirectories)');
139
150
  } else {
140
151
  console.log(' āš ļø Warning: references/ directory not found in source');
141
152
  }
@@ -156,12 +156,31 @@ try {
156
156
  console.log('āœ… Installed hook scripts to .claude/hooks/');
157
157
 
158
158
  // Copy skills directory (always, not just on version update)
159
+ console.log(`šŸ“ Looking for skills at: ${packageSkillsDir}`);
159
160
  if (fs.existsSync(packageSkillsDir)) {
160
161
  const skillsDir = path.join(claudeDir, 'skills');
162
+ console.log(`šŸ“ Copying skills to: ${skillsDir}`);
161
163
  copyDirRecursive(packageSkillsDir, skillsDir);
162
- console.log('āœ… Installed skills to .claude/skills/');
164
+
165
+ // Verify the copy worked
166
+ const devopsDir = path.join(skillsDir, 'memory-management', 'references', 'devops');
167
+ if (fs.existsSync(devopsDir)) {
168
+ const devopsFiles = fs.readdirSync(devopsDir);
169
+ console.log(`āœ… Installed skills to .claude/skills/ (including ${devopsFiles.length} devops files)`);
170
+ } else {
171
+ console.log('āœ… Installed skills to .claude/skills/');
172
+ console.log(`āš ļø Note: devops/ subdirectory not found after copy`);
173
+ }
163
174
  } else {
164
175
  console.log(`āš ļø Skills source not found at: ${packageSkillsDir}`);
176
+ // List what IS at the parent directory to help debug
177
+ const parentDir = path.join(__dirname, '../.claude');
178
+ if (fs.existsSync(parentDir)) {
179
+ console.log(`šŸ“ Contents of ${parentDir}:`);
180
+ fs.readdirSync(parentDir).forEach(f => console.log(` - ${f}`));
181
+ } else {
182
+ console.log(`āš ļø .claude directory not found at: ${parentDir}`);
183
+ }
165
184
  }
166
185
 
167
186
  // Create or update .claude/settings.json with hook configuration