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 +1 -1
- package/scripts/postinstall-claude-md.js +25 -14
- package/scripts/postinstall.js +20 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-recall",
|
|
3
|
-
"version": "0.8.
|
|
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
|
-
|
|
127
|
-
|
|
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
|
}
|
package/scripts/postinstall.js
CHANGED
|
@@ -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
|
-
|
|
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
|