smart-context-mcp 1.14.0 → 1.15.0

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/README.md CHANGED
@@ -56,7 +56,7 @@ Restart your AI client. Done.
56
56
  # Check installed version
57
57
  npm list -g smart-context-mcp
58
58
 
59
- # Should show: smart-context-mcp@1.14.0 (or later)
59
+ # Should show: smart-context-mcp@1.15.0 (or later)
60
60
 
61
61
  # Update to latest version
62
62
  npm update -g smart-context-mcp
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "smart-context-mcp",
3
3
  "mcpName": "io.github.Arrayo/smart-context-mcp",
4
- "version": "1.14.0",
4
+ "version": "1.15.0",
5
5
  "description": "MCP server that reduces agent token usage by 90% with intelligent context compression, task checkpoint persistence, and workflow-aware agent guidance.",
6
6
  "author": "Francisco Caballero Portero <fcp1978@hotmail.com>",
7
7
  "type": "module",
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/Arrayo/smart-context-mcp",
7
7
  "source": "github"
8
8
  },
9
- "version": "1.14.0",
9
+ "version": "1.15.0",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "smart-context-mcp",
14
- "version": "1.14.0",
14
+ "version": "1.15.0",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },
package/src/server.js CHANGED
@@ -158,7 +158,7 @@ export const createDevctxServer = () => {
158
158
 
159
159
  server.tool(
160
160
  'smart_context',
161
- 'PREFERRED for multi-file tasks. Gets curated context in one call — replaces the manual search → read → read cycle. Combines search + graph expansion + selective reading. Returns relevant files with symbols and content, optimized for tokens. Options: intent, maxTokens (budget), diff (true for HEAD or branch name), detail (minimal/balanced/deep), include (content/graph/hints/symbolDetail), prefetch (true for predictive loading). Call this FIRST before individual smart_read/smart_search calls.',
161
+ 'PREFERRED for multi-file tasks. Gets curated context in one call — replaces the manual search → read → read cycle. Combines search + graph expansion + selective reading. Primary files always include content (signatures) in balanced mode — reduces follow-up smart_read calls. Options: intent, maxTokens (budget, default 12000), diff (true for HEAD or branch name), detail (minimal/balanced/deep), include (content/graph/hints/symbolDetail), prefetch (true for predictive loading). Call this FIRST before individual smart_read/smart_search calls.',
162
162
  {
163
163
  task: z.string(),
164
164
  intent: z.enum(['implementation', 'debug', 'tests', 'config', 'docs', 'explore']).optional(),
@@ -196,9 +196,7 @@ export const allocateReads = (files, maxTokens, intent, detailMode = 'balanced')
196
196
 
197
197
  const mode = detailMode === 'deep'
198
198
  ? 'full'
199
- : best.role === 'primary' && !tightBudget
200
- ? 'outline'
201
- : 'signatures';
199
+ : 'signatures';
202
200
 
203
201
  roleLimits[best.role]--;
204
202
  selected.push(best);
@@ -269,8 +267,7 @@ const shouldReadContentForItem = (item, payload, detailMode, includeSet, intent)
269
267
  const strongIndexSignal = hasStrongIndexSignal(payload);
270
268
 
271
269
  if (item.role === 'primary') {
272
- if ((item.matchedSymbols?.length ?? 0) > 0) return false;
273
- return !strongIndexSignal;
270
+ return true;
274
271
  }
275
272
 
276
273
  if (item.role === 'test' && intent === 'tests') {
@@ -353,7 +350,7 @@ const DEFAULT_INCLUDE = ['content', 'graph', 'hints', 'symbolDetail'];
353
350
  export const smartContext = async ({
354
351
  task,
355
352
  intent,
356
- maxTokens = 8000,
353
+ maxTokens = 12000,
357
354
  entryFile,
358
355
  diff,
359
356
  detail = 'balanced',
@@ -518,7 +515,7 @@ export const smartContext = async ({
518
515
  primarySeeds.unshift({ rel, absPath: abs, evidence: [{ type: 'entryFile' }] });
519
516
  }
520
517
  }
521
- } catch { /* invalid path skip */ }
518
+ } catch (err) { process.stderr.write(`[devctx] smart_context: entryFile "${entryFile}" skipped: ${err.message}\n`); }
522
519
  }
523
520
 
524
521
  await ensureIndexReady({ root });
@@ -549,7 +546,7 @@ export const smartContext = async ({
549
546
  });
550
547
  }
551
548
  }
552
- } catch {}
549
+ } catch (err) { process.stderr.write(`[devctx] smart_context: prefetch path "${predicted.path}" skipped: ${err.message}\n`); }
553
550
  }
554
551
  }
555
552
  } catch (error) {
@@ -759,7 +756,7 @@ export const smartContext = async ({
759
756
  order: idx
760
757
  }))
761
758
  });
762
- } catch {}
759
+ } catch (err) { process.stderr.write(`[devctx] smart_context: recordContextAccess failed: ${err.message}\n`); }
763
760
  }
764
761
 
765
762
  const COVERAGE_RANK = { full: 2, partial: 1, none: 0 };
@@ -277,6 +277,7 @@ export const scorePrimarySeed = (seed, task, intent) => {
277
277
  let score = 0;
278
278
 
279
279
  for (const evidence of seed.evidence ?? []) {
280
+ if (evidence.type === 'entryFile') { score += 100; continue; }
280
281
  if (evidence.type !== 'searchHit') continue;
281
282
  score += Math.max(0, 40 - ((evidence.rank ?? 1) - 1) * 8);
282
283
  if (!evidence.query) continue;