@monoes/monomindcli 1.10.2 → 1.10.3

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": "@monoes/monomindcli",
3
- "version": "1.10.2",
3
+ "version": "1.10.3",
4
4
  "type": "module",
5
5
  "description": "Monomind CLI - Enterprise AI agent orchestration with 60+ specialized agents, swarm coordination, MCP server, self-learning hooks, and vector memory for Claude Code",
6
6
  "main": "dist/src/index.js",
@@ -362,20 +362,47 @@ const FRAMEWORK_SIGNATURES = [
362
362
  ['Gin', 'go.mod', ['gin-gonic/gin']],
363
363
  ];
364
364
 
365
+ function findManifests(dir, manifestName, maxDepth = 4) {
366
+ const fs = createRequire(import.meta.url)('node:fs');
367
+ const results = [];
368
+ function walk(d, depth) {
369
+ if (depth > maxDepth) return;
370
+ let entries;
371
+ try { entries = fs.readdirSync(d, { withFileTypes: true }); }
372
+ catch { return; }
373
+ for (const e of entries) {
374
+ if (e.name === 'node_modules' || e.name === 'dist' || e.name.startsWith('.')) continue;
375
+ const full = join(d, e.name);
376
+ if (e.isDirectory()) walk(full, depth + 1);
377
+ else if (e.name === manifestName) results.push(full);
378
+ }
379
+ }
380
+ walk(dir, 0);
381
+ return results;
382
+ }
383
+
365
384
  function detectFrameworks(dir) {
366
385
  const detected = [];
367
386
  const seen = new Set();
387
+ // Cache manifest contents by name to avoid re-reading
388
+ const manifestCache = new Map();
368
389
  for (const [name, manifest, keywords] of FRAMEWORK_SIGNATURES) {
369
390
  if (seen.has(name)) continue;
370
- const p = join(dir, manifest);
371
- if (!existsSync(p)) continue;
372
- try {
373
- const content = readFileSync(p, 'utf-8').toLowerCase();
374
- if (keywords.some(k => content.includes(k.toLowerCase()))) {
375
- detected.push(name);
376
- seen.add(name);
377
- }
378
- } catch {}
391
+ let manifestPaths = manifestCache.get(manifest);
392
+ if (!manifestPaths) {
393
+ manifestPaths = findManifests(dir, manifest);
394
+ manifestCache.set(manifest, manifestPaths);
395
+ }
396
+ for (const p of manifestPaths) {
397
+ try {
398
+ const content = readFileSync(p, 'utf-8').toLowerCase();
399
+ if (keywords.some(k => content.includes(k.toLowerCase()))) {
400
+ detected.push(name);
401
+ seen.add(name);
402
+ break;
403
+ }
404
+ } catch {}
405
+ }
379
406
  }
380
407
  return detected;
381
408
  }
@@ -702,8 +729,11 @@ async function main() {
702
729
  }
703
730
 
704
731
  // ── Final report ─────────────────────────────────────────────────────────
732
+ const title = dryRun
733
+ ? '║ /monomind:understand — DRY RUN (no writes) ║'
734
+ : '║ /monomind:understand — Enrichment Complete ║';
705
735
  console.log('\n╔══════════════════════════════════════════════════╗');
706
- console.log('║ /monomind:understand — Enrichment Complete ║');
736
+ console.log(title);
707
737
  console.log('╠══════════════════════════════════════════════════╣');
708
738
  console.log(`║ DB: ${relative(CWD, dbPathArg).padEnd(31)}║`);
709
739
  console.log(`║ Nodes enriched: ${String(written).padEnd(31)}║`);