@cocaxcode/ai-context-inspector 0.3.1 → 0.3.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.
@@ -1343,6 +1343,20 @@ body {
1343
1343
  align-items: center;
1344
1344
  }
1345
1345
 
1346
+ .nav-brand {
1347
+ display: inline-flex;
1348
+ align-items: center;
1349
+ gap: 0.3rem;
1350
+ margin-right: 0.3rem;
1351
+ }
1352
+
1353
+ .nav-separator {
1354
+ width: 1px;
1355
+ height: 16px;
1356
+ background: var(--border);
1357
+ margin: 0 0.4rem;
1358
+ }
1359
+
1346
1360
  .nav-link {
1347
1361
  padding: 0.3rem 0.7rem;
1348
1362
  border-radius: var(--radius-sm);
@@ -1440,6 +1454,8 @@ body {
1440
1454
  .badge--orange { border-color: var(--orange); color: var(--orange); }
1441
1455
  .badge--blue { border-color: var(--blue); color: var(--blue); }
1442
1456
  .badge--pink { border-color: var(--pink); color: var(--pink); }
1457
+ .badge--link { cursor: pointer; text-decoration: none; transition: transform 0.15s, box-shadow 0.15s; }
1458
+ .badge--link:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
1443
1459
 
1444
1460
  /* \u2500\u2500 Stats Grid \u2500\u2500 */
1445
1461
  .stats-grid {
@@ -2121,7 +2137,7 @@ document.addEventListener('DOMContentLoaded', () => {
2121
2137
 
2122
2138
  // \u2500\u2500 Animated Counters \u2500\u2500
2123
2139
  document.querySelectorAll('.stat-number').forEach(el => {
2124
- const target = parseInt(el.getAttribute('data-target') || '0')
2140
+ const target = parseInt(el.getAttribute('data-count') || '0')
2125
2141
  if (target === 0) { el.textContent = '0'; return }
2126
2142
  let current = 0
2127
2143
  const step = Math.max(1, Math.ceil(target / 25))
@@ -2222,8 +2238,8 @@ document.addEventListener('DOMContentLoaded', () => {
2222
2238
  }
2223
2239
  })
2224
2240
 
2225
- // \u2500\u2500 Nav Links (scroll to section) \u2500\u2500
2226
- document.querySelectorAll('.nav-link[data-target]').forEach(link => {
2241
+ // \u2500\u2500 Nav Links + Header Badges (scroll to section) \u2500\u2500
2242
+ document.querySelectorAll('[data-target]').forEach(link => {
2227
2243
  link.addEventListener('click', (e) => {
2228
2244
  e.preventDefault()
2229
2245
  scrollToSection(link.getAttribute('data-target'))
@@ -2405,34 +2421,14 @@ function buildCategories(result, summary) {
2405
2421
  }
2406
2422
  ];
2407
2423
  }
2408
- var COCAXCODE_ICON = `<g transform="translate(-16,-16)">
2409
- <defs>
2410
- <linearGradient id="cxc-g1" x1="0%" y1="0%" x2="100%" y2="100%">
2411
- <stop offset="0%" stop-color="#22d3ee"/>
2412
- <stop offset="100%" stop-color="#06b6d4"/>
2413
- </linearGradient>
2414
- <linearGradient id="cxc-g2" x1="0%" y1="0%" x2="100%" y2="100%">
2415
- <stop offset="0%" stop-color="#0891b2"/>
2416
- <stop offset="100%" stop-color="#0e7490"/>
2417
- </linearGradient>
2418
- </defs>
2419
- <rect width="32" height="32" fill="#0a0a0c" rx="4"/>
2420
- <rect x="9" y="7.5" width="16" height="18.5" rx="4" fill="url(#cxc-g2)" opacity="0.5"/>
2421
- <rect x="8" y="6.5" width="16" height="18.5" rx="4" fill="url(#cxc-g1)"/>
2422
- <path d="M11.5,11 L18,16 L11.5,21" fill="none" stroke="#0a0a0c" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
2423
- <line x1="19" y1="20" x2="21.5" y2="20" stroke="#0a0a0c" stroke-width="1.8" stroke-linecap="round">
2424
- <animate attributeName="x1" values="19;21.5;19" dur="1.4s" repeatCount="indefinite"/>
2425
- <animate attributeName="x2" values="21.5;24;21.5" dur="1.4s" repeatCount="indefinite"/>
2426
- </line>
2427
- </g>`;
2428
2424
  function renderEcosystemMap(result, summary) {
2429
2425
  const categories = buildCategories(result, summary);
2430
2426
  const totalItems = summary.totalMcpServers + summary.totalFiles + summary.totalSkills + summary.totalAgents + summary.totalMemories;
2431
2427
  if (totalItems === 0) return "";
2432
2428
  const W = 900;
2433
- const H = 480;
2429
+ const H = 530;
2434
2430
  const cx = W / 2;
2435
- const cy = H / 2;
2431
+ const cy = H / 2 + 25;
2436
2432
  const catRadius = 165;
2437
2433
  const itemRadius = 55;
2438
2434
  const startAngle = -Math.PI / 2;
@@ -2502,7 +2498,7 @@ function renderEcosystemMap(result, summary) {
2502
2498
  }
2503
2499
  }
2504
2500
  const nodeR = dimmed ? 24 : 32;
2505
- const labelY = y - nodeR - 10;
2501
+ const labelY = y - nodeR - 28;
2506
2502
  catNodes += `<g class="eco-cat-node" data-section="${cat.id}"
2507
2503
  style="cursor:pointer;opacity:${opacity}" role="button" tabindex="0">
2508
2504
  <!-- Hit area -->
@@ -2535,17 +2531,13 @@ function renderEcosystemMap(result, summary) {
2535
2531
  <!-- Main circle -->
2536
2532
  <circle cx="${cx}" cy="${cy}" r="42" fill="var(--bg-alt)" stroke="var(--accent)"
2537
2533
  stroke-width="2.5" filter="url(#eco-glow-center)"/>
2538
- <!-- cocaxcode icon in center -->
2539
- <g transform="translate(${cx},${cy - 8}) scale(0.85)">
2540
- ${COCAXCODE_ICON}
2541
- </g>
2542
- <!-- Project name below icon -->
2543
- <text x="${cx}" y="${cy + 20}" text-anchor="middle" dominant-baseline="auto"
2544
- font-family="var(--font-mono)" font-size="10" font-weight="600"
2545
- fill="var(--text-bright)" opacity="0.9">${esc(projectName)}</text>
2534
+ <!-- Project name -->
2535
+ <text x="${cx}" y="${cy - 2}" text-anchor="middle" dominant-baseline="auto"
2536
+ font-family="var(--font-mono)" font-size="11" font-weight="700"
2537
+ fill="var(--text-bright)" opacity="0.95">${esc(projectName)}</text>
2546
2538
  <!-- Total count -->
2547
- <text x="${cx}" y="${cy + 32}" text-anchor="middle" dominant-baseline="auto"
2548
- font-family="var(--font-mono)" font-size="8.5"
2539
+ <text x="${cx}" y="${cy + 14}" text-anchor="middle" dominant-baseline="auto"
2540
+ font-family="var(--font-mono)" font-size="9"
2549
2541
  fill="var(--text-dim)">${totalItems} elementos</text>
2550
2542
  </g>`;
2551
2543
  const tooltip = `<g id="eco-tooltip" style="display:none;pointer-events:none">
@@ -2600,7 +2592,21 @@ function renderNavBar(summary) {
2600
2592
  return `
2601
2593
  <nav class="nav-bar">
2602
2594
  <div class="nav-links">
2603
- <span style="font-family:var(--font-mono);font-size:0.8rem;color:var(--accent);margin-right:0.5rem">&gt;_</span>
2595
+ <span class="nav-brand">
2596
+ <svg viewBox="0 0 32 32" width="18" height="18" style="vertical-align:middle;margin-right:4px">
2597
+ <defs>
2598
+ <linearGradient id="nav-g1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#22d3ee"/><stop offset="100%" stop-color="#06b6d4"/></linearGradient>
2599
+ <linearGradient id="nav-g2" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" stop-color="#0891b2"/><stop offset="100%" stop-color="#0e7490"/></linearGradient>
2600
+ </defs>
2601
+ <rect width="32" height="32" fill="#0a0a0c" rx="4"/>
2602
+ <rect x="9" y="7.5" width="16" height="18.5" rx="4" fill="url(#nav-g2)" opacity="0.5"/>
2603
+ <rect x="8" y="6.5" width="16" height="18.5" rx="4" fill="url(#nav-g1)"/>
2604
+ <path d="M11.5,11 L18,16 L11.5,21" fill="none" stroke="#0a0a0c" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
2605
+ <line x1="19" y1="20" x2="21.5" y2="20" stroke="#0a0a0c" stroke-width="1.8" stroke-linecap="round"/>
2606
+ </svg>
2607
+ <span style="font-family:var(--font-mono);font-size:0.8rem"><span style="color:var(--text-dim)">by</span> <span style="color:var(--accent)">cocaxcode</span></span>
2608
+ </span>
2609
+ <span class="nav-separator"></span>
2604
2610
  ${navLinks}
2605
2611
  </div>
2606
2612
  <div class="nav-actions">
@@ -2616,12 +2622,12 @@ function renderHeader(project, summary, scanDuration) {
2616
2622
  <h1>&gt; ai-context-inspector</h1>
2617
2623
  <div class="subtitle">${esc2(project.name)} &mdash; ${date} &mdash; ${scanDuration}ms</div>
2618
2624
  <div class="badges">
2619
- <span class="badge badge--accent">${summary.totalMcpServers} MCPs</span>
2620
- <span class="badge badge--green">${summary.totalTools} tools</span>
2621
- <span class="badge badge--purple">${summary.totalFiles} archivos</span>
2622
- <span class="badge badge--orange">${summary.totalSkills} skills</span>
2623
- <span class="badge badge--blue">${summary.totalAgents} agents</span>
2624
- <span class="badge badge--pink">${summary.totalMemories} memorias</span>
2625
+ <a class="badge badge--accent badge--link" data-target="section-mcp">${summary.totalMcpServers} MCPs</a>
2626
+ <a class="badge badge--green badge--link" data-target="section-mcp">${summary.totalTools} tools</a>
2627
+ <a class="badge badge--purple badge--link" data-target="section-context">${summary.totalFiles} archivos</a>
2628
+ <a class="badge badge--orange badge--link" data-target="section-skills">${summary.totalSkills} skills</a>
2629
+ <a class="badge badge--blue badge--link" data-target="section-agents">${summary.totalAgents} agents</a>
2630
+ <a class="badge badge--pink badge--link" data-target="section-memories">${summary.totalMemories} memorias</a>
2625
2631
  </div>
2626
2632
  </header>`;
2627
2633
  }
@@ -2631,44 +2637,50 @@ function renderStatsGrid(summary) {
2631
2637
  icon: "\u2699\uFE0F",
2632
2638
  value: summary.totalMcpServers,
2633
2639
  label: "MCP Servers",
2634
- color: "#00d4ff"
2640
+ color: "#00d4ff",
2641
+ section: "section-mcp"
2635
2642
  },
2636
2643
  {
2637
2644
  icon: "\u{1F6E0}\uFE0F",
2638
2645
  value: summary.totalTools,
2639
2646
  label: "MCP Tools",
2640
- color: "#00e676"
2647
+ color: "#00e676",
2648
+ section: "section-mcp"
2641
2649
  },
2642
2650
  {
2643
2651
  icon: "\u{1F4C4}",
2644
2652
  value: summary.totalFiles,
2645
2653
  label: "Archivos AI",
2646
- color: "#b388ff"
2654
+ color: "#b388ff",
2655
+ section: "section-context"
2647
2656
  },
2648
2657
  {
2649
2658
  icon: "\u26A1",
2650
2659
  value: summary.totalSkills,
2651
2660
  label: "Skills",
2652
- color: "#ffab40"
2661
+ color: "#ffab40",
2662
+ section: "section-skills"
2653
2663
  },
2654
2664
  {
2655
2665
  icon: "\u{1F916}",
2656
2666
  value: summary.totalAgents,
2657
2667
  label: "Agents",
2658
- color: "#4285f4"
2668
+ color: "#4285f4",
2669
+ section: "section-agents"
2659
2670
  },
2660
2671
  {
2661
2672
  icon: "\u{1F9E0}",
2662
2673
  value: summary.totalMemories,
2663
2674
  label: "Memorias",
2664
- color: "#ff80ab"
2675
+ color: "#ff80ab",
2676
+ section: "section-memories"
2665
2677
  }
2666
2678
  ];
2667
2679
  const cards = stats.map(
2668
2680
  (s) => `
2669
- <div class="stat-card" style="--stat-color: ${s.color}">
2681
+ <div class="stat-card" data-target="${s.section}" style="--stat-color: ${s.color};cursor:pointer">
2670
2682
  <span class="stat-icon">${s.icon}</span>
2671
- <span class="stat-number" data-target="${s.value}">0</span>
2683
+ <span class="stat-number" data-count="${s.value}">0</span>
2672
2684
  <span class="stat-label">${s.label}</span>
2673
2685
  </div>`
2674
2686
  ).join("");
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  generateHtml,
4
4
  runAllScanners
5
- } from "./chunk-UKKIDJCN.js";
5
+ } from "./chunk-CAQUPN6F.js";
6
6
 
7
7
  // src/cli.ts
8
8
  import { parseArgs } from "util";
@@ -97,7 +97,7 @@ async function main() {
97
97
  const options = parseCliArgs(process.argv.slice(2));
98
98
  if (options.mcp) {
99
99
  const { StdioServerTransport } = await import("@modelcontextprotocol/sdk/server/stdio.js");
100
- const { createServer } = await import("./server-AC6HNUZR.js");
100
+ const { createServer } = await import("./server-HS77RFVF.js");
101
101
  const server = createServer();
102
102
  const transport = new StdioServerTransport();
103
103
  await server.connect(transport);
@@ -4,7 +4,7 @@ import {
4
4
  introspectServers,
5
5
  runAllScanners,
6
6
  scanMcpConfigs
7
- } from "./chunk-UKKIDJCN.js";
7
+ } from "./chunk-CAQUPN6F.js";
8
8
 
9
9
  // src/server.ts
10
10
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
@@ -116,15 +116,17 @@ function registerReportTool(server) {
116
116
  {
117
117
  dir: z3.string().optional().describe("Directorio a escanear (default: cwd)"),
118
118
  output: z3.string().optional().describe("Ruta del archivo HTML (default: ai-context-report.html)"),
119
- no_introspect: z3.boolean().optional().describe("No conectar a MCP servers")
119
+ include_user: z3.boolean().optional().describe("Incluir configuraci\xF3n del usuario (~/.claude, skills, memorias, agentes)"),
120
+ no_introspect: z3.boolean().optional().describe("No conectar a MCP servers"),
121
+ timeout: z3.number().optional().describe("Timeout de introspecci\xF3n en ms (default: 10000)")
120
122
  },
121
- async ({ dir, output, no_introspect }) => {
123
+ async ({ dir, output, include_user, no_introspect, timeout }) => {
122
124
  try {
123
125
  const result = await runAllScanners({
124
126
  dir: dir ?? process.cwd(),
125
- includeUser: false,
127
+ includeUser: include_user ?? false,
126
128
  introspect: !(no_introspect ?? false),
127
- timeout: 1e4
129
+ timeout: timeout ?? 1e4
128
130
  });
129
131
  const html = generateHtml(result);
130
132
  const outputPath = resolve(output ?? "ai-context-report.html");
package/package.json CHANGED
@@ -1,75 +1,75 @@
1
- {
2
- "name": "@cocaxcode/ai-context-inspector",
3
- "version": "0.3.1",
4
- "description": "Scan any project to discover its complete AI ecosystem: MCP servers, tools, context files, skills, memories. Generates an interactive HTML dashboard. Works as CLI and MCP server.",
5
- "type": "module",
6
- "bin": {
7
- "ai-context-inspector": "dist/index.js"
8
- },
9
- "files": [
10
- "dist"
11
- ],
12
- "scripts": {
13
- "build": "tsup",
14
- "dev": "tsup --watch",
15
- "test": "vitest run",
16
- "test:watch": "vitest",
17
- "test:coverage": "vitest run --coverage",
18
- "lint": "eslint src/",
19
- "format": "prettier --write \"src/**/*.ts\"",
20
- "format:check": "prettier --check \"src/**/*.ts\"",
21
- "typecheck": "tsc --noEmit",
22
- "prepare": "npm run build",
23
- "inspector": "npx @modelcontextprotocol/inspector node dist/index.js -- --mcp",
24
- "serve:report": "node serve-report.js"
25
- },
26
- "engines": {
27
- "node": ">=20.0.0"
28
- },
29
- "keywords": [
30
- "mcp",
31
- "mcp-server",
32
- "model-context-protocol",
33
- "ai-context",
34
- "ai-inspector",
35
- "ai-tools",
36
- "mcp-introspection",
37
- "claude",
38
- "cursor",
39
- "windsurf",
40
- "copilot",
41
- "gemini",
42
- "codex",
43
- "aider",
44
- "cline",
45
- "dashboard",
46
- "html-report",
47
- "context-files",
48
- "skills",
49
- "ai-ecosystem"
50
- ],
51
- "author": "cocaxcode",
52
- "license": "MIT",
53
- "repository": {
54
- "type": "git",
55
- "url": "https://github.com/cocaxcode/ai-context-inspector.git"
56
- },
57
- "homepage": "https://github.com/cocaxcode/ai-context-inspector#readme",
58
- "bugs": {
59
- "url": "https://github.com/cocaxcode/ai-context-inspector/issues"
60
- },
61
- "dependencies": {
62
- "@modelcontextprotocol/sdk": "^1.27.0",
63
- "zod": "^3.25.0"
64
- },
65
- "devDependencies": {
66
- "@types/node": "^22.15.0",
67
- "@vitest/coverage-v8": "^3.2.0",
68
- "eslint": "^9.28.0",
69
- "prettier": "^3.5.0",
70
- "tsup": "^8.5.0",
71
- "typescript": "^5.8.0",
72
- "typescript-eslint": "^8.33.0",
73
- "vitest": "^3.2.0"
74
- }
75
- }
1
+ {
2
+ "name": "@cocaxcode/ai-context-inspector",
3
+ "version": "0.3.3",
4
+ "description": "Scan any project to discover its complete AI ecosystem: MCP servers, tools, context files, skills, memories. Generates an interactive HTML dashboard. Works as CLI and MCP server.",
5
+ "type": "module",
6
+ "bin": {
7
+ "ai-context-inspector": "dist/index.js"
8
+ },
9
+ "files": [
10
+ "dist"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsup",
14
+ "dev": "tsup --watch",
15
+ "test": "vitest run",
16
+ "test:watch": "vitest",
17
+ "test:coverage": "vitest run --coverage",
18
+ "lint": "eslint src/",
19
+ "format": "prettier --write \"src/**/*.ts\"",
20
+ "format:check": "prettier --check \"src/**/*.ts\"",
21
+ "typecheck": "tsc --noEmit",
22
+ "prepare": "npm run build",
23
+ "inspector": "npx @modelcontextprotocol/inspector node dist/index.js -- --mcp",
24
+ "serve:report": "node serve-report.cjs"
25
+ },
26
+ "engines": {
27
+ "node": ">=20.0.0"
28
+ },
29
+ "keywords": [
30
+ "mcp",
31
+ "mcp-server",
32
+ "model-context-protocol",
33
+ "ai-context",
34
+ "ai-inspector",
35
+ "ai-tools",
36
+ "mcp-introspection",
37
+ "claude",
38
+ "cursor",
39
+ "windsurf",
40
+ "copilot",
41
+ "gemini",
42
+ "codex",
43
+ "aider",
44
+ "cline",
45
+ "dashboard",
46
+ "html-report",
47
+ "context-files",
48
+ "skills",
49
+ "ai-ecosystem"
50
+ ],
51
+ "author": "cocaxcode",
52
+ "license": "MIT",
53
+ "repository": {
54
+ "type": "git",
55
+ "url": "https://github.com/cocaxcode/ai-context-inspector.git"
56
+ },
57
+ "homepage": "https://github.com/cocaxcode/ai-context-inspector#readme",
58
+ "bugs": {
59
+ "url": "https://github.com/cocaxcode/ai-context-inspector/issues"
60
+ },
61
+ "dependencies": {
62
+ "@modelcontextprotocol/sdk": "^1.27.0",
63
+ "zod": "^3.25.0"
64
+ },
65
+ "devDependencies": {
66
+ "@types/node": "^22.15.0",
67
+ "@vitest/coverage-v8": "^3.2.0",
68
+ "eslint": "^9.28.0",
69
+ "prettier": "^3.5.0",
70
+ "tsup": "^8.5.0",
71
+ "typescript": "^5.8.0",
72
+ "typescript-eslint": "^8.33.0",
73
+ "vitest": "^3.2.0"
74
+ }
75
+ }