remem-mcp 0.6.7 → 0.6.8
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/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5195,6 +5195,14 @@ function hookPostToolUse(dbPath) {
|
|
|
5195
5195
|
process.stdout.write(JSON.stringify({}));
|
|
5196
5196
|
return;
|
|
5197
5197
|
}
|
|
5198
|
+
const bashIgnorePatterns = loadCaptureExclusions(cwd);
|
|
5199
|
+
if (bashIgnorePatterns.length > 0 && shouldExcludeCommand(command, bashIgnorePatterns)) {
|
|
5200
|
+
logToFile(
|
|
5201
|
+
`PostToolUse: skipping Bash \u2014 command matches capture exclusion: ${command.slice(0, 80)}`
|
|
5202
|
+
);
|
|
5203
|
+
process.stdout.write(JSON.stringify({}));
|
|
5204
|
+
return;
|
|
5205
|
+
}
|
|
5198
5206
|
let db;
|
|
5199
5207
|
try {
|
|
5200
5208
|
db = new Database8(dbPath);
|
|
@@ -6226,6 +6234,18 @@ function shouldExcludePath(filePath, ignorePatterns) {
|
|
|
6226
6234
|
}
|
|
6227
6235
|
return false;
|
|
6228
6236
|
}
|
|
6237
|
+
function shouldExcludeCommand(command, ignorePatterns) {
|
|
6238
|
+
if (ignorePatterns.length === 0) return false;
|
|
6239
|
+
for (const pattern of ignorePatterns) {
|
|
6240
|
+
if (pattern.startsWith("*.")) continue;
|
|
6241
|
+
const re = new RegExp(`(^|[\\s/])${escapeRegex(pattern)}([\\s/]|$)`);
|
|
6242
|
+
if (re.test(command)) return true;
|
|
6243
|
+
}
|
|
6244
|
+
return false;
|
|
6245
|
+
}
|
|
6246
|
+
function escapeRegex(s) {
|
|
6247
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
6248
|
+
}
|
|
6229
6249
|
function isNoiseCommand(command) {
|
|
6230
6250
|
const lower = command.toLowerCase().trim();
|
|
6231
6251
|
if (/\/nonexistent|\/tmp\/test|\/test\/fake|example\.ts|foo\.ts|bar\.ts/.test(lower)) return true;
|