monomind 1.18.8 → 1.18.10

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.
Files changed (49) hide show
  1. package/package.json +1 -1
  2. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +1 -0
  3. package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +17 -1
  4. package/packages/@monomind/cli/dist/src/commands/doctor.js +15 -1
  5. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.d.ts +1 -2
  6. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +1 -2
  7. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.d.ts +1 -2
  8. package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +2 -117
  9. package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -2
  10. package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -4
  11. package/packages/@monomind/cli/dist/src/commands/index.js +0 -22
  12. package/packages/@monomind/cli/dist/src/init/executor.d.ts +3 -0
  13. package/packages/@monomind/cli/dist/src/init/executor.js +20 -111
  14. package/packages/@monomind/cli/dist/src/mcp-client.js +0 -2
  15. package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -1
  16. package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -1
  17. package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts +4 -4
  18. package/packages/@monomind/cli/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts +4 -4
  19. package/packages/@monomind/cli/package.json +1 -1
  20. package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +0 -134
  21. package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +0 -340
  22. package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.d.ts +0 -36
  23. package/packages/@monomind/cli/dist/src/benchmarks/metric-evaluators.js +0 -125
  24. package/packages/@monomind/cli/dist/src/commands/benchmark.d.ts +0 -10
  25. package/packages/@monomind/cli/dist/src/commands/benchmark.js +0 -586
  26. package/packages/@monomind/cli/dist/src/commands/migrate.d.ts +0 -8
  27. package/packages/@monomind/cli/dist/src/commands/migrate.js +0 -789
  28. package/packages/@monomind/cli/dist/src/commands/monovector/backup.d.ts +0 -11
  29. package/packages/@monomind/cli/dist/src/commands/monovector/backup.js +0 -752
  30. package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.d.ts +0 -11
  31. package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.js +0 -502
  32. package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +0 -18
  33. package/packages/@monomind/cli/dist/src/commands/monovector/import.js +0 -374
  34. package/packages/@monomind/cli/dist/src/commands/monovector/index.d.ts +0 -29
  35. package/packages/@monomind/cli/dist/src/commands/monovector/index.js +0 -129
  36. package/packages/@monomind/cli/dist/src/commands/monovector/init.d.ts +0 -11
  37. package/packages/@monomind/cli/dist/src/commands/monovector/init.js +0 -481
  38. package/packages/@monomind/cli/dist/src/commands/monovector/migrate.d.ts +0 -11
  39. package/packages/@monomind/cli/dist/src/commands/monovector/migrate.js +0 -500
  40. package/packages/@monomind/cli/dist/src/commands/monovector/optimize.d.ts +0 -11
  41. package/packages/@monomind/cli/dist/src/commands/monovector/optimize.js +0 -515
  42. package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +0 -18
  43. package/packages/@monomind/cli/dist/src/commands/monovector/setup.js +0 -775
  44. package/packages/@monomind/cli/dist/src/commands/monovector/status.d.ts +0 -11
  45. package/packages/@monomind/cli/dist/src/commands/monovector/status.js +0 -491
  46. package/packages/@monomind/cli/dist/src/commands/progress.d.ts +0 -11
  47. package/packages/@monomind/cli/dist/src/commands/progress.js +0 -261
  48. package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.d.ts +0 -14
  49. package/packages/@monomind/cli/dist/src/mcp-tools/progress-tools.js +0 -353
@@ -1,125 +0,0 @@
1
- /**
2
- * Metric Evaluators for Benchmark Runner (Task 34)
3
- * Individual metric evaluation functions for quality assessment.
4
- */
5
- /**
6
- * Checks whether the output contains the expected substring.
7
- */
8
- export function containsExpected(output, config) {
9
- // Cap expected to prevent huge strings from inflating returned objects
10
- const expected = typeof config.expected === 'string' ? config.expected.slice(0, 200) : '';
11
- const found = output.includes(expected);
12
- return {
13
- type: 'contains_expected',
14
- passed: found,
15
- actual: found ? expected : null,
16
- expected,
17
- message: found
18
- ? `Output contains expected string "${expected}"`
19
- : `Output missing expected string "${expected}"`,
20
- };
21
- }
22
- /**
23
- * Checks whether the output length falls within the specified range.
24
- */
25
- export function lengthRange(output, config) {
26
- const len = output.length;
27
- const passed = len >= config.min && len <= config.max;
28
- return {
29
- type: 'length_range',
30
- passed,
31
- actual: len,
32
- expected: { min: config.min, max: config.max },
33
- message: passed
34
- ? `Output length ${len} within range [${config.min}, ${config.max}]`
35
- : `Output length ${len} outside range [${config.min}, ${config.max}]`,
36
- };
37
- }
38
- /**
39
- * Checks that the output does not contain any forbidden words (hallucination markers).
40
- */
41
- export function noHallucination(output, config) {
42
- const lowerOutput = output.toLowerCase();
43
- // Cap forbidden array to 200 entries to prevent unbounded O(n) scan
44
- const forbidden = Array.isArray(config.forbidden) ? config.forbidden.slice(0, 200) : [];
45
- const found = forbidden.filter((word) => typeof word === 'string' && lowerOutput.includes(word.toLowerCase()));
46
- const passed = found.length === 0;
47
- // Truncate reflected words to avoid inflated messages
48
- const truncatedFound = found.map((w) => w.slice(0, 50));
49
- return {
50
- type: 'no_hallucination',
51
- passed,
52
- actual: found.length > 0 ? truncatedFound : null,
53
- expected: null,
54
- message: passed
55
- ? 'No forbidden words found in output'
56
- : `Forbidden words found: ${truncatedFound.join(', ')}`,
57
- };
58
- }
59
- /**
60
- * Checks whether the output is valid JSON.
61
- */
62
- export function jsonValid(output) {
63
- let passed = false;
64
- let parsedType = null;
65
- // Cap output before JSON.parse to prevent OOM on huge strings
66
- const MAX_JSON_BYTES = 1 * 1024 * 1024; // 1 MB
67
- const bounded = typeof output === 'string' && output.length > MAX_JSON_BYTES
68
- ? output.slice(0, MAX_JSON_BYTES)
69
- : output;
70
- try {
71
- const parsed = JSON.parse(bounded);
72
- passed = true;
73
- parsedType = typeof parsed;
74
- }
75
- catch {
76
- // not valid JSON
77
- }
78
- return {
79
- type: 'json_valid',
80
- passed,
81
- actual: passed ? parsedType : 'invalid',
82
- expected: 'valid JSON',
83
- message: passed ? 'Output is valid JSON' : 'Output is not valid JSON',
84
- };
85
- }
86
- /**
87
- * Checks whether the output matches a custom regex pattern.
88
- */
89
- export function customRegex(output, config) {
90
- // Reject overly long patterns and those with nested/repeated quantifiers
91
- // (catastrophic backtracking — a malicious benchmark definition could
92
- // pin CI runners with `^(a+)+$` against a long output string).
93
- if (typeof config.pattern !== 'string' || config.pattern.length > 200) {
94
- return {
95
- type: 'custom_regex',
96
- passed: false,
97
- actual: null,
98
- expected: config.pattern,
99
- message: 'Pattern rejected: too long or invalid',
100
- };
101
- }
102
- if (/(\(.*[+*?].*\)|[+*?]){2,}|\{[0-9,]+\}.*[+*?]|\([^)]*\|[^)]*\)[+*?{]/.test(config.pattern)) {
103
- return {
104
- type: 'custom_regex',
105
- passed: false,
106
- actual: null,
107
- expected: config.pattern,
108
- message: 'Pattern rejected: nested quantifiers risk catastrophic backtracking',
109
- };
110
- }
111
- // Cap output length so even slow patterns can't burn unlimited CPU
112
- const boundedOutput = output.length > 1024 * 1024 ? output.slice(0, 1024 * 1024) : output;
113
- const regex = new RegExp(config.pattern);
114
- const match = regex.test(boundedOutput);
115
- return {
116
- type: 'custom_regex',
117
- passed: match,
118
- actual: match ? boundedOutput.match(regex)?.[0] ?? null : null,
119
- expected: config.pattern,
120
- message: match
121
- ? `Output matches pattern /${config.pattern}/`
122
- : `Output does not match pattern /${config.pattern}/`,
123
- };
124
- }
125
- //# sourceMappingURL=metric-evaluators.js.map
@@ -1,10 +0,0 @@
1
- /**
2
- * CLI Benchmark Command
3
- * Comprehensive benchmarking for self-learning, pre-training, and neural systems
4
- *
5
- * @module v1/cli/commands/benchmark
6
- */
7
- import type { Command } from '../types.js';
8
- export declare const benchmarkCommand: Command;
9
- export default benchmarkCommand;
10
- //# sourceMappingURL=benchmark.d.ts.map