@monoes/monomindcli 1.15.4 → 1.15.5

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 (105) hide show
  1. package/dist/src/mcp-client.d.ts.map +1 -1
  2. package/dist/src/mcp-client.js +7 -0
  3. package/dist/src/mcp-client.js.map +1 -1
  4. package/dist/src/mcp-tools/coherence/causal-infer.d.ts +15 -0
  5. package/dist/src/mcp-tools/coherence/causal-infer.d.ts.map +1 -0
  6. package/dist/src/mcp-tools/coherence/causal-infer.js +347 -0
  7. package/dist/src/mcp-tools/coherence/causal-infer.js.map +1 -0
  8. package/dist/src/mcp-tools/coherence/coherence-check.d.ts +15 -0
  9. package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +1 -0
  10. package/dist/src/mcp-tools/coherence/coherence-check.js +206 -0
  11. package/dist/src/mcp-tools/coherence/coherence-check.js.map +1 -0
  12. package/dist/src/mcp-tools/coherence/consensus-verify.d.ts +15 -0
  13. package/dist/src/mcp-tools/coherence/consensus-verify.d.ts.map +1 -0
  14. package/dist/src/mcp-tools/coherence/consensus-verify.js +303 -0
  15. package/dist/src/mcp-tools/coherence/consensus-verify.js.map +1 -0
  16. package/dist/src/mcp-tools/coherence/memory-gate.d.ts +15 -0
  17. package/dist/src/mcp-tools/coherence/memory-gate.d.ts.map +1 -0
  18. package/dist/src/mcp-tools/coherence/memory-gate.js +266 -0
  19. package/dist/src/mcp-tools/coherence/memory-gate.js.map +1 -0
  20. package/dist/src/mcp-tools/coherence/quantum-topology.d.ts +15 -0
  21. package/dist/src/mcp-tools/coherence/quantum-topology.d.ts.map +1 -0
  22. package/dist/src/mcp-tools/coherence/quantum-topology.js +406 -0
  23. package/dist/src/mcp-tools/coherence/quantum-topology.js.map +1 -0
  24. package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +15 -0
  25. package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts.map +1 -0
  26. package/dist/src/mcp-tools/coherence/spectral-analyze.js +293 -0
  27. package/dist/src/mcp-tools/coherence/spectral-analyze.js.map +1 -0
  28. package/dist/src/mcp-tools/coherence/types.d.ts +277 -0
  29. package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -0
  30. package/dist/src/mcp-tools/coherence/types.js +159 -0
  31. package/dist/src/mcp-tools/coherence/types.js.map +1 -0
  32. package/dist/src/mcp-tools/coherence-tools.d.ts +9 -0
  33. package/dist/src/mcp-tools/coherence-tools.d.ts.map +1 -0
  34. package/dist/src/mcp-tools/coherence-tools.js +25 -0
  35. package/dist/src/mcp-tools/coherence-tools.js.map +1 -0
  36. package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.d.ts +163 -0
  37. package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.d.ts.map +1 -0
  38. package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.js +414 -0
  39. package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.js.map +1 -0
  40. package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.d.ts +128 -0
  41. package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.d.ts.map +1 -0
  42. package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.js +375 -0
  43. package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.js.map +1 -0
  44. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts +161 -0
  45. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts.map +1 -0
  46. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +423 -0
  47. package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js.map +1 -0
  48. package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts +165 -0
  49. package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts.map +1 -0
  50. package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.js +395 -0
  51. package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.js.map +1 -0
  52. package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.d.ts +165 -0
  53. package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.d.ts.map +1 -0
  54. package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.js +508 -0
  55. package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.js.map +1 -0
  56. package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.d.ts +147 -0
  57. package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.d.ts.map +1 -0
  58. package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.js +391 -0
  59. package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.js.map +1 -0
  60. package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.d.ts +147 -0
  61. package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.d.ts.map +1 -0
  62. package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.js +422 -0
  63. package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.js.map +1 -0
  64. package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.d.ts +185 -0
  65. package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.d.ts.map +1 -0
  66. package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.js +437 -0
  67. package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.js.map +1 -0
  68. package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.d.ts +166 -0
  69. package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.d.ts.map +1 -0
  70. package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.js +410 -0
  71. package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.js.map +1 -0
  72. package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.d.ts +201 -0
  73. package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.d.ts.map +1 -0
  74. package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.js +363 -0
  75. package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.js.map +1 -0
  76. package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.d.ts +166 -0
  77. package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.d.ts.map +1 -0
  78. package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.js +394 -0
  79. package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.js.map +1 -0
  80. package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +129 -0
  81. package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts.map +1 -0
  82. package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js +383 -0
  83. package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js.map +1 -0
  84. package/dist/src/mcp-tools/quality/security-compliance/security-scan.d.ts +171 -0
  85. package/dist/src/mcp-tools/quality/security-compliance/security-scan.d.ts.map +1 -0
  86. package/dist/src/mcp-tools/quality/security-compliance/security-scan.js +476 -0
  87. package/dist/src/mcp-tools/quality/security-compliance/security-scan.js.map +1 -0
  88. package/dist/src/mcp-tools/quality/test-generation/generate-tests.d.ts +147 -0
  89. package/dist/src/mcp-tools/quality/test-generation/generate-tests.d.ts.map +1 -0
  90. package/dist/src/mcp-tools/quality/test-generation/generate-tests.js +400 -0
  91. package/dist/src/mcp-tools/quality/test-generation/generate-tests.js.map +1 -0
  92. package/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts +145 -0
  93. package/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts.map +1 -0
  94. package/dist/src/mcp-tools/quality/test-generation/suggest-tests.js +328 -0
  95. package/dist/src/mcp-tools/quality/test-generation/suggest-tests.js.map +1 -0
  96. package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.d.ts +126 -0
  97. package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.d.ts.map +1 -0
  98. package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.js +348 -0
  99. package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.js.map +1 -0
  100. package/dist/src/mcp-tools/quality-tools.d.ts +9 -0
  101. package/dist/src/mcp-tools/quality-tools.d.ts.map +1 -0
  102. package/dist/src/mcp-tools/quality-tools.js +308 -0
  103. package/dist/src/mcp-tools/quality-tools.js.map +1 -0
  104. package/dist/tsconfig.tsbuildinfo +1 -1
  105. package/package.json +1 -1
@@ -0,0 +1,266 @@
1
+ /**
2
+ * Memory Gate Tool - pr_memory_gate
3
+ *
4
+ * Pre-storage coherence gate for memory entries.
5
+ * Validates that new entries are coherent with existing context before storage.
6
+ *
7
+ * Uses CohomologyEngine Sheaf Laplacian for coherence validation
8
+ */
9
+ import { MemoryGateInputSchema, successResult, errorResult, cosineSimilarity, } from './types.js';
10
+ // Default logger
11
+ const defaultLogger = {
12
+ debug: (msg, meta) => console.debug(`[pr_memory_gate] ${msg}`, meta),
13
+ info: (msg, meta) => console.info(`[pr_memory_gate] ${msg}`, meta),
14
+ warn: (msg, meta) => console.warn(`[pr_memory_gate] ${msg}`, meta),
15
+ error: (msg, meta) => console.error(`[pr_memory_gate] ${msg}`, meta),
16
+ };
17
+ // ============================================================================
18
+ // Memory Gate Functions
19
+ // ============================================================================
20
+ /**
21
+ * Generate embedding from value (simplified - in production use actual embedding model)
22
+ */
23
+ function generateEmbedding(value) {
24
+ // Convert value to string representation
25
+ const str = typeof value === 'string' ? value : JSON.stringify(value);
26
+ // Simple hash-based embedding (for demo purposes)
27
+ // In production, use actual embedding model
28
+ const embedding = new Array(64).fill(0);
29
+ for (let i = 0; i < str.length; i++) {
30
+ const charCode = str.charCodeAt(i);
31
+ const idx = i % embedding.length;
32
+ embedding[idx] += charCode * (i + 1) * 0.001;
33
+ }
34
+ // Normalize
35
+ let norm = 0;
36
+ for (let i = 0; i < embedding.length; i++) {
37
+ norm += embedding[i] * embedding[i];
38
+ }
39
+ norm = Math.sqrt(norm);
40
+ if (norm > 0) {
41
+ for (let i = 0; i < embedding.length; i++) {
42
+ embedding[i] /= norm;
43
+ }
44
+ }
45
+ return embedding;
46
+ }
47
+ /**
48
+ * Compute coherence energy using Sheaf Laplacian
49
+ */
50
+ function computeCoherenceEnergy(newEmbedding, existingEmbeddings) {
51
+ if (existingEmbeddings.length === 0)
52
+ return 0;
53
+ let totalDisagreement = 0;
54
+ for (const existing of existingEmbeddings) {
55
+ const similarity = cosineSimilarity(newEmbedding, existing);
56
+ const disagreement = 1 - Math.max(0, similarity);
57
+ totalDisagreement += disagreement;
58
+ }
59
+ return totalDisagreement / existingEmbeddings.length;
60
+ }
61
+ /**
62
+ * Detect specific violations
63
+ */
64
+ function detectViolations(newEmbedding, existingEmbeddings, warnThreshold) {
65
+ const violations = [];
66
+ for (let i = 0; i < existingEmbeddings.length; i++) {
67
+ const similarity = cosineSimilarity(newEmbedding, existingEmbeddings[i]);
68
+ if (similarity < -0.3) {
69
+ violations.push(`Strong contradiction with context entry ${i} (similarity: ${similarity.toFixed(3)})`);
70
+ }
71
+ else if (similarity < warnThreshold) {
72
+ violations.push(`Weak coherence with context entry ${i} (similarity: ${similarity.toFixed(3)})`);
73
+ }
74
+ }
75
+ return violations;
76
+ }
77
+ /**
78
+ * Determine action based on coherence energy
79
+ */
80
+ function determineAction(energy, thresholds) {
81
+ if (energy >= thresholds.reject) {
82
+ return 'reject';
83
+ }
84
+ if (energy >= thresholds.warn) {
85
+ return 'warn';
86
+ }
87
+ return 'allow';
88
+ }
89
+ /**
90
+ * Get interpretation of memory gate result
91
+ */
92
+ function getInterpretation(action, energy, violations) {
93
+ switch (action) {
94
+ case 'allow':
95
+ return 'Entry is coherent with existing context - storage allowed';
96
+ case 'warn':
97
+ return `Entry has minor inconsistencies (energy: ${energy.toFixed(3)}) - storage allowed with warning`;
98
+ case 'reject':
99
+ return `Entry contradicts existing context (energy: ${energy.toFixed(3)}) - storage blocked. ${violations.length} violation(s) detected.`;
100
+ }
101
+ }
102
+ /**
103
+ * Handler for pr_memory_gate tool
104
+ */
105
+ async function handler(input, context) {
106
+ const logger = context?.logger ?? defaultLogger;
107
+ const startTime = performance.now();
108
+ try {
109
+ // Validate input
110
+ const validationResult = MemoryGateInputSchema.safeParse(input);
111
+ if (!validationResult.success) {
112
+ logger.error('Input validation failed', { error: validationResult.error.message });
113
+ return errorResult(`Invalid input: ${validationResult.error.message}`);
114
+ }
115
+ const { key, value, existingVectors, thresholds } = validationResult.data;
116
+ // Get thresholds from config or input
117
+ const warnThreshold = thresholds?.warn ?? context?.config?.coherence?.warnThreshold ?? 0.3;
118
+ const rejectThreshold = thresholds?.reject ?? context?.config?.coherence?.rejectThreshold ?? 0.7;
119
+ logger.debug('Processing memory gate check', {
120
+ key,
121
+ hasExistingContext: !!existingVectors?.length,
122
+ contextSize: existingVectors?.length ?? 0,
123
+ warnThreshold,
124
+ rejectThreshold,
125
+ });
126
+ // Generate embedding for the new value
127
+ const newEmbedding = generateEmbedding(value);
128
+ // If no existing context, always allow
129
+ if (!existingVectors || existingVectors.length === 0) {
130
+ const output = {
131
+ allowed: true,
132
+ coherenceEnergy: 0,
133
+ details: {
134
+ action: 'allow',
135
+ violations: [],
136
+ confidence: 1,
137
+ interpretation: 'No existing context - entry allowed',
138
+ contextSize: 0,
139
+ },
140
+ };
141
+ const duration = performance.now() - startTime;
142
+ logger.info('Memory gate check completed (no context)', {
143
+ key,
144
+ allowed: true,
145
+ durationMs: duration.toFixed(2),
146
+ });
147
+ return successResult(output);
148
+ }
149
+ // Validate embedding dimensions match
150
+ const firstDim = existingVectors[0].length;
151
+ for (let i = 1; i < existingVectors.length; i++) {
152
+ if (existingVectors[i].length !== firstDim) {
153
+ return errorResult(`Context embedding dimension mismatch: entry ${i} has ${existingVectors[i].length} dimensions, expected ${firstDim}`);
154
+ }
155
+ }
156
+ let coherenceEnergy;
157
+ let violations;
158
+ // Try to use WASM bridge if available
159
+ if (context?.bridge?.initialized) {
160
+ try {
161
+ logger.debug('Using WASM bridge for coherence check');
162
+ const allEmbeddings = [
163
+ new Float32Array(newEmbedding),
164
+ ...existingVectors.map(v => new Float32Array(v)),
165
+ ];
166
+ const result = await context.bridge.checkCoherence(allEmbeddings);
167
+ coherenceEnergy = result.energy;
168
+ violations = result.violations;
169
+ }
170
+ catch (wasmError) {
171
+ logger.warn('WASM bridge failed, falling back to JS implementation', {
172
+ error: wasmError instanceof Error ? wasmError.message : String(wasmError),
173
+ });
174
+ coherenceEnergy = computeCoherenceEnergy(newEmbedding, existingVectors);
175
+ violations = detectViolations(newEmbedding, existingVectors, warnThreshold);
176
+ }
177
+ }
178
+ else {
179
+ // Pure JavaScript fallback
180
+ logger.debug('Using JavaScript fallback for memory gate');
181
+ coherenceEnergy = computeCoherenceEnergy(newEmbedding, existingVectors);
182
+ violations = detectViolations(newEmbedding, existingVectors, warnThreshold);
183
+ }
184
+ const action = determineAction(coherenceEnergy, { warn: warnThreshold, reject: rejectThreshold });
185
+ const allowed = action !== 'reject';
186
+ const confidence = 1 - coherenceEnergy;
187
+ const output = {
188
+ allowed,
189
+ coherenceEnergy,
190
+ reason: !allowed ? `Coherence energy ${coherenceEnergy.toFixed(3)} exceeds reject threshold ${rejectThreshold}` : undefined,
191
+ details: {
192
+ action,
193
+ violations,
194
+ confidence,
195
+ interpretation: getInterpretation(action, coherenceEnergy, violations),
196
+ contextSize: existingVectors.length,
197
+ },
198
+ };
199
+ const duration = performance.now() - startTime;
200
+ logger.info('Memory gate check completed', {
201
+ key,
202
+ allowed,
203
+ action,
204
+ coherenceEnergy: coherenceEnergy.toFixed(4),
205
+ violations: violations.length,
206
+ durationMs: duration.toFixed(2),
207
+ });
208
+ return successResult(output);
209
+ }
210
+ catch (error) {
211
+ const duration = performance.now() - startTime;
212
+ logger.error('Memory gate check failed', {
213
+ error: error instanceof Error ? error.message : String(error),
214
+ durationMs: duration.toFixed(2),
215
+ });
216
+ return errorResult(error instanceof Error ? error : new Error(String(error)));
217
+ }
218
+ }
219
+ /**
220
+ * pr_memory_gate MCP Tool Definition
221
+ */
222
+ export const memoryGateTool = {
223
+ name: 'pr_memory_gate',
224
+ description: 'Pre-storage coherence gate for memory entries. Validates new entries against existing context using Sheaf Laplacian energy. Blocks contradictory entries to maintain memory coherence.',
225
+ category: 'memory',
226
+ version: '0.1.3',
227
+ tags: ['memory', 'coherence', 'gate', 'validation', 'ai-interpretability'],
228
+ cacheable: false, // Context changes frequently
229
+ inputSchema: {
230
+ type: 'object',
231
+ properties: {
232
+ key: {
233
+ type: 'string',
234
+ description: 'Memory entry key',
235
+ },
236
+ value: {
237
+ description: 'Value to be stored (any JSON-serializable type)',
238
+ },
239
+ existingVectors: {
240
+ type: 'array',
241
+ items: { type: 'array', items: { type: 'number' } },
242
+ description: 'Existing context embeddings to check against',
243
+ },
244
+ thresholds: {
245
+ type: 'object',
246
+ properties: {
247
+ warn: {
248
+ type: 'number',
249
+ default: 0.3,
250
+ description: 'Energy threshold for warnings (0-1)',
251
+ },
252
+ reject: {
253
+ type: 'number',
254
+ default: 0.7,
255
+ description: 'Energy threshold for rejection (0-1)',
256
+ },
257
+ },
258
+ description: 'Custom coherence thresholds',
259
+ },
260
+ },
261
+ required: ['key', 'value'],
262
+ },
263
+ handler,
264
+ };
265
+ export default memoryGateTool;
266
+ //# sourceMappingURL=memory-gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"memory-gate.js","sourceRoot":"","sources":["../../../../src/mcp-tools/coherence/memory-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,EACL,qBAAqB,EACrB,aAAa,EACb,WAAW,EACX,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,iBAAiB;AACjB,MAAM,aAAa,GAAG;IACpB,KAAK,EAAE,CAAC,GAAW,EAAE,IAA8B,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,EAAE,EAAE,IAAI,CAAC;IACtG,IAAI,EAAE,CAAC,GAAW,EAAE,IAA8B,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,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OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;gBACnD,WAAW,EAAE,8CAA8C;aAC5D;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,GAAG;wBACZ,WAAW,EAAE,qCAAqC;qBACnD;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,GAAG;wBACZ,WAAW,EAAE,sCAAsC;qBACpD;iBACF;gBACD,WAAW,EAAE,6BAA6B;aAC3C;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;KAC3B;IACD,OAAO;CACR,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Quantum Topology Tool - pr_quantum_topology
3
+ *
4
+ * Computes quantum topology features including Betti numbers and persistence diagrams.
5
+ * Analyzes topological features of point clouds and simplicial complexes.
6
+ *
7
+ * Uses QuantumEngine from prime-radiant-advanced-wasm
8
+ */
9
+ import type { MCPTool } from './types.js';
10
+ /**
11
+ * pr_quantum_topology MCP Tool Definition
12
+ */
13
+ export declare const quantumTopologyTool: MCPTool;
14
+ export default quantumTopologyTool;
15
+ //# sourceMappingURL=quantum-topology.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"quantum-topology.d.ts","sourceRoot":"","sources":["../../../../src/mcp-tools/coherence/quantum-topology.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EACV,OAAO,EAKR,MAAM,YAAY,CAAC;AAuapB;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OA2CjC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}