@kevinrabun/judges 3.119.0 → 3.121.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.
@@ -3,7 +3,6 @@
3
3
  // ──────────────────────────────────────────────────────────────────────────────
4
4
  import { z } from "zod";
5
5
  import { readFileSync, existsSync } from "fs";
6
- import { extname } from "path";
7
6
  import { JUDGES, getJudge, getJudgeSummaries } from "../judges/index.js";
8
7
  import { evaluateWithJudge, evaluateWithTribunal, evaluateWithTribunalStreaming, formatVerdictAsMarkdown, formatEvaluationAsMarkdown, } from "../evaluators/index.js";
9
8
  import { evaluateCodeV2, evaluateProjectV2, getSupportedPolicyProfiles } from "../evaluators/v2.js";
@@ -408,35 +407,9 @@ function registerEvaluateV2(server) {
408
407
  });
409
408
  }
410
409
  // ─── evaluate_file ───────────────────────────────────────────────────────────
411
- const EXT_TO_LANG = {
412
- ".ts": "typescript",
413
- ".tsx": "typescript",
414
- ".js": "javascript",
415
- ".jsx": "javascript",
416
- ".mjs": "javascript",
417
- ".cjs": "javascript",
418
- ".py": "python",
419
- ".rs": "rust",
420
- ".go": "go",
421
- ".java": "java",
422
- ".cs": "csharp",
423
- ".cpp": "cpp",
424
- ".cc": "cpp",
425
- ".h": "c",
426
- ".hpp": "cpp",
427
- ".ps1": "powershell",
428
- ".psm1": "powershell",
429
- ".bicep": "bicep",
430
- ".tf": "terraform",
431
- ".yaml": "yaml",
432
- ".yml": "yaml",
433
- };
410
+ import { detectLanguageFromPath as _detectLangShared } from "../ext-to-lang.js";
434
411
  function detectLanguageFromPath(filePath) {
435
- const lower = filePath.toLowerCase();
436
- if (lower.endsWith("dockerfile") || lower.includes("dockerfile."))
437
- return "dockerfile";
438
- const ext = extname(lower);
439
- return EXT_TO_LANG[ext] || "typescript";
412
+ return _detectLangShared(filePath) ?? "typescript";
440
413
  }
441
414
  function registerEvaluateFile(server) {
442
415
  server.tool("evaluate_file", `Read a file from disk and submit it to the full Judges Panel for evaluation. Automatically detects the programming language from the file extension. All ${JUDGES.length} judges review the code with pattern detection and deep contextual analysis.`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kevinrabun/judges",
3
- "version": "3.119.0",
3
+ "version": "3.121.0",
4
4
  "description": "45 specialized judges that evaluate AI-generated code for security, cost, and quality.",
5
5
  "mcpName": "io.github.KevinRabun/judges",
6
6
  "type": "module",
package/server.json CHANGED
@@ -7,12 +7,12 @@
7
7
  "url": "https://github.com/kevinrabun/judges",
8
8
  "source": "github"
9
9
  },
10
- "version": "3.119.0",
10
+ "version": "3.121.0",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@kevinrabun/judges",
15
- "version": "3.119.0",
15
+ "version": "3.121.0",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  }