smart-context-mcp 1.7.7 → 1.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smart-context-mcp",
3
- "version": "1.7.7",
3
+ "version": "1.7.8",
4
4
  "description": "MCP server that reduces agent token usage by 90% with intelligent context compression, task checkpoint persistence, and workflow-aware agent guidance.",
5
5
  "author": "Francisco Caballero Portero <fcp1978@hotmail.com>",
6
6
  "type": "module",
@@ -19,3 +19,9 @@ export const IGNORED_FILE_NAMES = [
19
19
  'bun.lockb',
20
20
  'npm-shrinkwrap.json',
21
21
  ];
22
+
23
+ export const IGNORED_FILE_PATTERNS = [
24
+ /\.min\.(js|css)$/,
25
+ /\.(map|snap)$/,
26
+ /^(questions|answers|fixtures|seed|dump|data)\.(json|jsonl|ndjson)$/i,
27
+ ];
@@ -11,7 +11,7 @@ import { truncate } from '../utils/text.js';
11
11
  import { recordToolUsage } from '../usage-feedback.js';
12
12
  import { recordDecision, DECISION_REASONS, EXPECTED_BENEFITS } from '../decision-explainer.js';
13
13
  import { recordDevctxOperation } from '../missed-opportunities.js';
14
- import { IGNORED_DIRS, IGNORED_FILE_NAMES } from '../config/ignored-paths.js';
14
+ import { IGNORED_DIRS, IGNORED_FILE_NAMES, IGNORED_FILE_PATTERNS } from '../config/ignored-paths.js';
15
15
  import { buildMetricsDisplay } from '../utils/metrics-display.js';
16
16
  import { createProgressReporter } from '../streaming.js';
17
17
  import { ensureIndexReady } from '../index-manager.js';
@@ -44,7 +44,12 @@ export const intentWeights = {
44
44
 
45
45
  const defaultWeights = intentWeights.explore;
46
46
 
47
- const shouldIgnoreFile = (filePath) => ignoredFileNames.has(path.basename(filePath));
47
+ const shouldIgnoreFile = (filePath) => {
48
+ const base = path.basename(filePath);
49
+ if (ignoredFileNames.has(base)) return true;
50
+ if (IGNORED_FILE_PATTERNS.some((p) => p.test(base))) return true;
51
+ return false;
52
+ };
48
53
 
49
54
  const isSearchableFile = (entryName, fullPath) => fallbackExtensions.has(path.extname(entryName)) || isDockerfile(fullPath);
50
55
 
@@ -92,6 +97,8 @@ const parseRgLine = (line, root) => {
92
97
  };
93
98
  };
94
99
 
100
+ const MAX_FILE_SIZE = '1M';
101
+
95
102
  const searchWithRipgrep = async (root, query) => {
96
103
  const args = [
97
104
  '--line-number',
@@ -100,10 +107,12 @@ const searchWithRipgrep = async (root, query) => {
100
107
  'never',
101
108
  '--smart-case',
102
109
  '--fixed-strings',
110
+ '--max-filesize', MAX_FILE_SIZE,
103
111
  ];
104
112
 
105
113
  for (const dir of ignoredDirs) {
106
114
  args.push('--glob', `!${dir}/**`);
115
+ args.push('--glob', `!**/${dir}/**`);
107
116
  }
108
117
 
109
118
  for (const fileName of ignoredFileNames) {