@monoes/monomindcli 1.15.4 → 1.15.6
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/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +7 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/coherence/causal-infer.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/causal-infer.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/causal-infer.js +347 -0
- package/dist/src/mcp-tools/coherence/causal-infer.js.map +1 -0
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/coherence-check.js +206 -0
- package/dist/src/mcp-tools/coherence/coherence-check.js.map +1 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.js +303 -0
- package/dist/src/mcp-tools/coherence/consensus-verify.js.map +1 -0
- package/dist/src/mcp-tools/coherence/memory-gate.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/memory-gate.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/memory-gate.js +266 -0
- package/dist/src/mcp-tools/coherence/memory-gate.js.map +1 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.js +406 -0
- package/dist/src/mcp-tools/coherence/quantum-topology.js.map +1 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +15 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.js +293 -0
- package/dist/src/mcp-tools/coherence/spectral-analyze.js.map +1 -0
- package/dist/src/mcp-tools/coherence/types.d.ts +277 -0
- package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence/types.js +159 -0
- package/dist/src/mcp-tools/coherence/types.js.map +1 -0
- package/dist/src/mcp-tools/coherence-tools.d.ts +9 -0
- package/dist/src/mcp-tools/coherence-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/coherence-tools.js +25 -0
- package/dist/src/mcp-tools/coherence-tools.js.map +1 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.d.ts +163 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.js +414 -0
- package/dist/src/mcp-tools/quality/chaos-resilience/chaos-inject.js.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.d.ts +128 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.js +375 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/analyze-coverage.js.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts +161 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +423 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts +165 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.js +395 -0
- package/dist/src/mcp-tools/quality/coverage-analysis/track-trends.js.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.d.ts +165 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.js +508 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/analyze-root-cause.js.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.d.ts +147 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.js +391 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/find-similar-defects.js.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.d.ts +147 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.js +422 -0
- package/dist/src/mcp-tools/quality/defect-intelligence/predict-defects.js.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.d.ts +185 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.js +437 -0
- package/dist/src/mcp-tools/quality/quality-assessment/assess-readiness.js.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.d.ts +166 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.js +410 -0
- package/dist/src/mcp-tools/quality/quality-assessment/calculate-risk.js.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.d.ts +201 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.js +363 -0
- package/dist/src/mcp-tools/quality/quality-assessment/evaluate-quality-gate.js.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.d.ts +166 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.js +394 -0
- package/dist/src/mcp-tools/quality/security-compliance/audit-compliance.js.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +129 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js +383 -0
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.d.ts +171 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.js +476 -0
- package/dist/src/mcp-tools/quality/security-compliance/security-scan.js.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.d.ts +147 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.js +400 -0
- package/dist/src/mcp-tools/quality/test-generation/generate-tests.js.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts +145 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.js +328 -0
- package/dist/src/mcp-tools/quality/test-generation/suggest-tests.js.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.d.ts +126 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.js +348 -0
- package/dist/src/mcp-tools/quality/test-generation/tdd-cycle.js.map +1 -0
- package/dist/src/mcp-tools/quality-tools.d.ts +9 -0
- package/dist/src/mcp-tools/quality-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/quality-tools.js +308 -0
- package/dist/src/mcp-tools/quality-tools.js.map +1 -0
- package/dist/src/plugins/store/discovery.d.ts.map +1 -1
- package/dist/src/plugins/store/discovery.js +4 -124
- package/dist/src/plugins/store/discovery.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/scripts/publish-registry.ts +0 -2
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spectral Analysis Tool - pr_spectral_analyze
|
|
3
|
+
*
|
|
4
|
+
* Analyzes stability of systems using spectral graph theory.
|
|
5
|
+
* Computes eigenvalues, spectral gap, and stability metrics.
|
|
6
|
+
*
|
|
7
|
+
* Uses SpectralEngine from prime-radiant-advanced-wasm
|
|
8
|
+
*/
|
|
9
|
+
import { SpectralInputSchema, successResult, errorResult, } from './types.js';
|
|
10
|
+
// Default logger
|
|
11
|
+
const defaultLogger = {
|
|
12
|
+
debug: (msg, meta) => console.debug(`[pr_spectral_analyze] ${msg}`, meta),
|
|
13
|
+
info: (msg, meta) => console.info(`[pr_spectral_analyze] ${msg}`, meta),
|
|
14
|
+
warn: (msg, meta) => console.warn(`[pr_spectral_analyze] ${msg}`, meta),
|
|
15
|
+
error: (msg, meta) => console.error(`[pr_spectral_analyze] ${msg}`, meta),
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* Power iteration method for finding dominant eigenvalue
|
|
19
|
+
*/
|
|
20
|
+
function powerIteration(matrix, maxIterations = 100, tolerance = 1e-10) {
|
|
21
|
+
const n = matrix.length;
|
|
22
|
+
if (n === 0)
|
|
23
|
+
return 0;
|
|
24
|
+
// Initialize random vector
|
|
25
|
+
let v = new Array(n).fill(0).map(() => Math.random());
|
|
26
|
+
let eigenvalue = 0;
|
|
27
|
+
for (let iter = 0; iter < maxIterations; iter++) {
|
|
28
|
+
// Multiply matrix by vector
|
|
29
|
+
const w = new Array(n).fill(0);
|
|
30
|
+
for (let i = 0; i < n; i++) {
|
|
31
|
+
for (let j = 0; j < n; j++) {
|
|
32
|
+
w[i] += matrix[i][j] * v[j];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
// Find max component for normalization
|
|
36
|
+
let maxComponent = 0;
|
|
37
|
+
for (let i = 0; i < n; i++) {
|
|
38
|
+
if (Math.abs(w[i]) > Math.abs(maxComponent)) {
|
|
39
|
+
maxComponent = w[i];
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (Math.abs(maxComponent) < tolerance)
|
|
43
|
+
break;
|
|
44
|
+
// Check convergence
|
|
45
|
+
const newEigenvalue = maxComponent;
|
|
46
|
+
if (Math.abs(newEigenvalue - eigenvalue) < tolerance) {
|
|
47
|
+
return newEigenvalue;
|
|
48
|
+
}
|
|
49
|
+
eigenvalue = newEigenvalue;
|
|
50
|
+
// Normalize
|
|
51
|
+
for (let i = 0; i < n; i++) {
|
|
52
|
+
v[i] = w[i] / maxComponent;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return eigenvalue;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Compute approximate eigenvalues using QR iteration (simplified)
|
|
59
|
+
* For production, consider using a proper numerical library
|
|
60
|
+
*/
|
|
61
|
+
function computeEigenvalues(matrix) {
|
|
62
|
+
const n = matrix.length;
|
|
63
|
+
if (n === 0)
|
|
64
|
+
return [];
|
|
65
|
+
if (n === 1)
|
|
66
|
+
return [matrix[0][0]];
|
|
67
|
+
// For small matrices, use characteristic polynomial roots (simplified)
|
|
68
|
+
// For larger matrices, use power iteration for top k eigenvalues
|
|
69
|
+
const eigenvalues = [];
|
|
70
|
+
// Get dominant eigenvalue
|
|
71
|
+
const lambda1 = powerIteration(matrix);
|
|
72
|
+
eigenvalues.push(lambda1);
|
|
73
|
+
// For spectral analysis, we mainly need the top eigenvalues and spectral gap
|
|
74
|
+
// Use deflation to get second eigenvalue
|
|
75
|
+
if (n > 1) {
|
|
76
|
+
// Simplified: estimate second eigenvalue from trace
|
|
77
|
+
let trace = 0;
|
|
78
|
+
for (let i = 0; i < n; i++) {
|
|
79
|
+
trace += matrix[i][i];
|
|
80
|
+
}
|
|
81
|
+
// Second eigenvalue approximation
|
|
82
|
+
const lambda2Approx = (trace - lambda1) / (n - 1);
|
|
83
|
+
eigenvalues.push(lambda2Approx);
|
|
84
|
+
// Add remaining approximate eigenvalues
|
|
85
|
+
for (let i = 2; i < Math.min(n, 10); i++) {
|
|
86
|
+
eigenvalues.push(lambda2Approx * (1 - i * 0.1)); // Decreasing approximation
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return eigenvalues.sort((a, b) => Math.abs(b) - Math.abs(a));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Compute the Laplacian matrix from adjacency matrix
|
|
93
|
+
*/
|
|
94
|
+
function computeLaplacian(adjacency) {
|
|
95
|
+
const n = adjacency.length;
|
|
96
|
+
const laplacian = [];
|
|
97
|
+
for (let i = 0; i < n; i++) {
|
|
98
|
+
laplacian[i] = [];
|
|
99
|
+
let degree = 0;
|
|
100
|
+
for (let j = 0; j < n; j++) {
|
|
101
|
+
degree += adjacency[i][j];
|
|
102
|
+
}
|
|
103
|
+
for (let j = 0; j < n; j++) {
|
|
104
|
+
if (i === j) {
|
|
105
|
+
laplacian[i][j] = degree;
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
laplacian[i][j] = -adjacency[i][j];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return laplacian;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Compute spectral gap (difference between first and second eigenvalues)
|
|
116
|
+
*/
|
|
117
|
+
function computeSpectralGap(eigenvalues) {
|
|
118
|
+
if (eigenvalues.length < 2)
|
|
119
|
+
return 0;
|
|
120
|
+
// For Laplacian: spectral gap is lambda_2 (first non-zero eigenvalue)
|
|
121
|
+
// Eigenvalues should be sorted by magnitude
|
|
122
|
+
const sorted = [...eigenvalues].sort((a, b) => a - b);
|
|
123
|
+
// Find first significantly non-zero eigenvalue
|
|
124
|
+
for (let i = 0; i < sorted.length; i++) {
|
|
125
|
+
if (Math.abs(sorted[i]) > 1e-10) {
|
|
126
|
+
return sorted[i];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return sorted.length > 1 ? Math.abs(sorted[1] - sorted[0]) : 0;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Compute stability index based on eigenvalue distribution
|
|
133
|
+
*/
|
|
134
|
+
function computeStabilityIndex(eigenvalues) {
|
|
135
|
+
if (eigenvalues.length === 0)
|
|
136
|
+
return 0;
|
|
137
|
+
// Stability based on eigenvalue spread and negativity
|
|
138
|
+
const maxEig = Math.max(...eigenvalues.map(Math.abs));
|
|
139
|
+
if (maxEig === 0)
|
|
140
|
+
return 1;
|
|
141
|
+
// Count negative eigenvalues (indicate instability in dynamical systems)
|
|
142
|
+
const negativeCount = eigenvalues.filter(e => e < -1e-10).length;
|
|
143
|
+
const negativeRatio = negativeCount / eigenvalues.length;
|
|
144
|
+
// Stability score: higher is more stable
|
|
145
|
+
// Based on spectral gap and lack of negative eigenvalues
|
|
146
|
+
const spectralGap = computeSpectralGap(eigenvalues);
|
|
147
|
+
const normalizedGap = Math.min(spectralGap / maxEig, 1);
|
|
148
|
+
return (1 - negativeRatio) * (0.5 + 0.5 * normalizedGap);
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Get interpretation of spectral analysis results
|
|
152
|
+
*/
|
|
153
|
+
function getInterpretation(stable, spectralGap, stabilityIndex) {
|
|
154
|
+
if (stable && stabilityIndex > 0.8) {
|
|
155
|
+
return 'System is highly stable with strong connectivity';
|
|
156
|
+
}
|
|
157
|
+
if (stable && stabilityIndex > 0.5) {
|
|
158
|
+
return 'System is stable with moderate connectivity';
|
|
159
|
+
}
|
|
160
|
+
if (stable) {
|
|
161
|
+
return 'System is marginally stable - monitor for changes';
|
|
162
|
+
}
|
|
163
|
+
if (spectralGap < 0.01) {
|
|
164
|
+
return 'System shows instability - agents may be forming isolated clusters';
|
|
165
|
+
}
|
|
166
|
+
if (stabilityIndex < 0.3) {
|
|
167
|
+
return 'System is unstable - coordination patterns are fragmented';
|
|
168
|
+
}
|
|
169
|
+
return 'System shows instability patterns - recommend topology adjustment';
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Handler for pr_spectral_analyze tool
|
|
173
|
+
*/
|
|
174
|
+
async function handler(input, context) {
|
|
175
|
+
const logger = context?.logger ?? defaultLogger;
|
|
176
|
+
const startTime = performance.now();
|
|
177
|
+
try {
|
|
178
|
+
// Validate input
|
|
179
|
+
const validationResult = SpectralInputSchema.safeParse(input);
|
|
180
|
+
if (!validationResult.success) {
|
|
181
|
+
logger.error('Input validation failed', { error: validationResult.error.message });
|
|
182
|
+
return errorResult(`Invalid input: ${validationResult.error.message}`);
|
|
183
|
+
}
|
|
184
|
+
const { matrix, analyzeType } = validationResult.data;
|
|
185
|
+
const n = matrix.length;
|
|
186
|
+
logger.debug('Processing spectral analysis', { matrixSize: n, analyzeType });
|
|
187
|
+
// Validate square matrix
|
|
188
|
+
for (let i = 0; i < n; i++) {
|
|
189
|
+
if (matrix[i].length !== n) {
|
|
190
|
+
return errorResult(`Matrix must be square. Row ${i} has ${matrix[i].length} elements, expected ${n}`);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// Check max matrix size from config
|
|
194
|
+
const maxSize = context?.config?.spectral?.maxMatrixSize ?? 1000;
|
|
195
|
+
if (n > maxSize) {
|
|
196
|
+
return errorResult(`Matrix size ${n} exceeds maximum allowed size ${maxSize}`);
|
|
197
|
+
}
|
|
198
|
+
let eigenvalues;
|
|
199
|
+
let spectralGap;
|
|
200
|
+
let stabilityIndex;
|
|
201
|
+
// Try to use WASM bridge if available
|
|
202
|
+
if (context?.bridge?.initialized) {
|
|
203
|
+
try {
|
|
204
|
+
logger.debug('Using WASM bridge for spectral analysis');
|
|
205
|
+
const flatMatrix = new Float32Array(matrix.flat());
|
|
206
|
+
const result = await context.bridge.analyzeSpectral(flatMatrix, n);
|
|
207
|
+
eigenvalues = result.eigenvalues;
|
|
208
|
+
spectralGap = result.spectralGap;
|
|
209
|
+
stabilityIndex = result.stabilityIndex;
|
|
210
|
+
}
|
|
211
|
+
catch (wasmError) {
|
|
212
|
+
logger.warn('WASM bridge failed, falling back to JS implementation', {
|
|
213
|
+
error: wasmError instanceof Error ? wasmError.message : String(wasmError),
|
|
214
|
+
});
|
|
215
|
+
// Compute Laplacian for stability analysis
|
|
216
|
+
const laplacian = computeLaplacian(matrix);
|
|
217
|
+
eigenvalues = computeEigenvalues(laplacian);
|
|
218
|
+
spectralGap = computeSpectralGap(eigenvalues);
|
|
219
|
+
stabilityIndex = computeStabilityIndex(eigenvalues);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
// Pure JavaScript fallback
|
|
224
|
+
logger.debug('Using JavaScript fallback for spectral analysis');
|
|
225
|
+
const laplacian = computeLaplacian(matrix);
|
|
226
|
+
eigenvalues = computeEigenvalues(laplacian);
|
|
227
|
+
spectralGap = computeSpectralGap(eigenvalues);
|
|
228
|
+
stabilityIndex = computeStabilityIndex(eigenvalues);
|
|
229
|
+
}
|
|
230
|
+
// Determine stability based on spectral gap threshold
|
|
231
|
+
const stabilityThreshold = context?.config?.spectral?.stabilityThreshold ?? 0.1;
|
|
232
|
+
const stable = spectralGap > stabilityThreshold && stabilityIndex > 0.5;
|
|
233
|
+
const output = {
|
|
234
|
+
spectralGap,
|
|
235
|
+
eigenvalues: eigenvalues.slice(0, 10), // Return top 10 eigenvalues
|
|
236
|
+
stable,
|
|
237
|
+
details: {
|
|
238
|
+
stabilityIndex,
|
|
239
|
+
interpretation: getInterpretation(stable, spectralGap, stabilityIndex),
|
|
240
|
+
matrixSize: n,
|
|
241
|
+
analyzeType,
|
|
242
|
+
},
|
|
243
|
+
};
|
|
244
|
+
const duration = performance.now() - startTime;
|
|
245
|
+
logger.info('Spectral analysis completed', {
|
|
246
|
+
stable,
|
|
247
|
+
spectralGap: spectralGap.toFixed(4),
|
|
248
|
+
stabilityIndex: stabilityIndex.toFixed(4),
|
|
249
|
+
durationMs: duration.toFixed(2),
|
|
250
|
+
});
|
|
251
|
+
return successResult(output);
|
|
252
|
+
}
|
|
253
|
+
catch (error) {
|
|
254
|
+
const duration = performance.now() - startTime;
|
|
255
|
+
logger.error('Spectral analysis failed', {
|
|
256
|
+
error: error instanceof Error ? error.message : String(error),
|
|
257
|
+
durationMs: duration.toFixed(2),
|
|
258
|
+
});
|
|
259
|
+
return errorResult(error instanceof Error ? error : new Error(String(error)));
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* pr_spectral_analyze MCP Tool Definition
|
|
264
|
+
*/
|
|
265
|
+
export const spectralAnalyzeTool = {
|
|
266
|
+
name: 'pr_spectral_analyze',
|
|
267
|
+
description: 'Analyze stability using spectral graph theory. Computes eigenvalues, spectral gap, and stability metrics. Uses SpectralEngine for mathematical validation of system stability.',
|
|
268
|
+
category: 'spectral',
|
|
269
|
+
version: '0.1.3',
|
|
270
|
+
tags: ['spectral', 'eigenvalues', 'stability', 'graph-theory', 'ai-interpretability'],
|
|
271
|
+
cacheable: true,
|
|
272
|
+
cacheTTL: 60000,
|
|
273
|
+
inputSchema: {
|
|
274
|
+
type: 'object',
|
|
275
|
+
properties: {
|
|
276
|
+
matrix: {
|
|
277
|
+
type: 'array',
|
|
278
|
+
items: { type: 'array', items: { type: 'number' } },
|
|
279
|
+
description: 'Adjacency matrix representing connections (must be square)',
|
|
280
|
+
},
|
|
281
|
+
analyzeType: {
|
|
282
|
+
type: 'string',
|
|
283
|
+
enum: ['stability', 'clustering', 'connectivity'],
|
|
284
|
+
default: 'stability',
|
|
285
|
+
description: 'Type of analysis to perform',
|
|
286
|
+
},
|
|
287
|
+
},
|
|
288
|
+
required: ['matrix'],
|
|
289
|
+
},
|
|
290
|
+
handler,
|
|
291
|
+
};
|
|
292
|
+
export default spectralAnalyzeTool;
|
|
293
|
+
//# sourceMappingURL=spectral-analyze.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file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I,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;gBACnD,WAAW,EAAE,4DAA4D;aAC1E;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,cAAc,CAAC;gBACjD,OAAO,EAAE,WAAW;gBACpB,WAAW,EAAE,6BAA6B;aAC3C;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;IACD,OAAO;CACR,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prime Radiant MCP Tool Types
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for Prime Radiant mathematical AI tools.
|
|
5
|
+
*/
|
|
6
|
+
import { z } from 'zod';
|
|
7
|
+
export interface MCPToolInputSchema {
|
|
8
|
+
type: 'object';
|
|
9
|
+
properties: Record<string, unknown>;
|
|
10
|
+
required?: string[];
|
|
11
|
+
}
|
|
12
|
+
export interface MCPToolResult {
|
|
13
|
+
content: Array<{
|
|
14
|
+
type: 'text' | 'image' | 'resource';
|
|
15
|
+
text?: string;
|
|
16
|
+
data?: string;
|
|
17
|
+
mimeType?: string;
|
|
18
|
+
}>;
|
|
19
|
+
isError?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export interface MCPTool {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: MCPToolInputSchema;
|
|
25
|
+
category?: string;
|
|
26
|
+
tags?: string[];
|
|
27
|
+
version?: string;
|
|
28
|
+
cacheable?: boolean;
|
|
29
|
+
cacheTTL?: number;
|
|
30
|
+
handler: (input: Record<string, unknown>, context?: ToolContext) => Promise<MCPToolResult>;
|
|
31
|
+
}
|
|
32
|
+
export interface ToolContext {
|
|
33
|
+
bridge?: PrimeRadiantBridge;
|
|
34
|
+
config?: PrimeRadiantConfig;
|
|
35
|
+
logger?: Logger;
|
|
36
|
+
}
|
|
37
|
+
export interface Logger {
|
|
38
|
+
debug(message: string, meta?: Record<string, unknown>): void;
|
|
39
|
+
info(message: string, meta?: Record<string, unknown>): void;
|
|
40
|
+
warn(message: string, meta?: Record<string, unknown>): void;
|
|
41
|
+
error(message: string, meta?: Record<string, unknown>): void;
|
|
42
|
+
}
|
|
43
|
+
export interface PrimeRadiantConfig {
|
|
44
|
+
coherence: {
|
|
45
|
+
warnThreshold: number;
|
|
46
|
+
rejectThreshold: number;
|
|
47
|
+
cacheEnabled: boolean;
|
|
48
|
+
cacheTTL: number;
|
|
49
|
+
};
|
|
50
|
+
spectral: {
|
|
51
|
+
stabilityThreshold: number;
|
|
52
|
+
maxMatrixSize: number;
|
|
53
|
+
};
|
|
54
|
+
causal: {
|
|
55
|
+
maxBackdoorPaths: number;
|
|
56
|
+
confidenceThreshold: number;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
export interface PrimeRadiantBridge {
|
|
60
|
+
initialized: boolean;
|
|
61
|
+
initialize(): Promise<void>;
|
|
62
|
+
dispose(): Promise<void>;
|
|
63
|
+
checkCoherence(vectors: Float32Array[]): Promise<CoherenceResult>;
|
|
64
|
+
analyzeSpectral(adjacencyMatrix: Float32Array, size: number): Promise<SpectralResult>;
|
|
65
|
+
inferCausal(graph: CausalGraph, intervention: string, outcome: string): Promise<CausalResult>;
|
|
66
|
+
computeTopology(complex: SimplicialComplex): Promise<TopologyResult>;
|
|
67
|
+
}
|
|
68
|
+
export declare const CoherenceInputSchema: z.ZodObject<{
|
|
69
|
+
vectors: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
70
|
+
threshold: z.ZodDefault<z.ZodNumber>;
|
|
71
|
+
}, z.core.$strip>;
|
|
72
|
+
export type CoherenceInput = z.infer<typeof CoherenceInputSchema>;
|
|
73
|
+
export interface CoherenceResult {
|
|
74
|
+
coherent: boolean;
|
|
75
|
+
energy: number;
|
|
76
|
+
violations: string[];
|
|
77
|
+
confidence: number;
|
|
78
|
+
}
|
|
79
|
+
export interface CoherenceOutput {
|
|
80
|
+
energy: number;
|
|
81
|
+
isCoherent: boolean;
|
|
82
|
+
details: {
|
|
83
|
+
violations: string[];
|
|
84
|
+
confidence: number;
|
|
85
|
+
interpretation: string;
|
|
86
|
+
vectorCount: number;
|
|
87
|
+
threshold: number;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export declare const SpectralInputSchema: z.ZodObject<{
|
|
91
|
+
matrix: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
92
|
+
analyzeType: z.ZodDefault<z.ZodEnum<{
|
|
93
|
+
stability: "stability";
|
|
94
|
+
clustering: "clustering";
|
|
95
|
+
connectivity: "connectivity";
|
|
96
|
+
}>>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type SpectralInput = z.infer<typeof SpectralInputSchema>;
|
|
99
|
+
export interface SpectralResult {
|
|
100
|
+
stable: boolean;
|
|
101
|
+
eigenvalues: number[];
|
|
102
|
+
spectralGap: number;
|
|
103
|
+
stabilityIndex: number;
|
|
104
|
+
}
|
|
105
|
+
export interface SpectralOutput {
|
|
106
|
+
spectralGap: number;
|
|
107
|
+
eigenvalues: number[];
|
|
108
|
+
stable: boolean;
|
|
109
|
+
details: {
|
|
110
|
+
stabilityIndex: number;
|
|
111
|
+
interpretation: string;
|
|
112
|
+
matrixSize: number;
|
|
113
|
+
analyzeType: string;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export declare const CausalGraphSchema: z.ZodObject<{
|
|
117
|
+
nodes: z.ZodArray<z.ZodString>;
|
|
118
|
+
edges: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export type CausalGraph = z.infer<typeof CausalGraphSchema>;
|
|
121
|
+
export declare const CausalInputSchema: z.ZodObject<{
|
|
122
|
+
graph: z.ZodObject<{
|
|
123
|
+
nodes: z.ZodArray<z.ZodString>;
|
|
124
|
+
edges: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
intervention: z.ZodString;
|
|
127
|
+
outcome: z.ZodString;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export type CausalInput = z.infer<typeof CausalInputSchema>;
|
|
130
|
+
export interface CausalResult {
|
|
131
|
+
effect: number;
|
|
132
|
+
confounders: string[];
|
|
133
|
+
interventionValid: boolean;
|
|
134
|
+
backdoorPaths: string[][];
|
|
135
|
+
confidence: number;
|
|
136
|
+
}
|
|
137
|
+
export interface CausalOutput {
|
|
138
|
+
effect: number;
|
|
139
|
+
confidence: number;
|
|
140
|
+
backdoorPaths: string[];
|
|
141
|
+
details: {
|
|
142
|
+
confounders: string[];
|
|
143
|
+
interventionValid: boolean;
|
|
144
|
+
interpretation: string;
|
|
145
|
+
nodeCount: number;
|
|
146
|
+
edgeCount: number;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export declare const AgentStateSchema: z.ZodObject<{
|
|
150
|
+
agentId: z.ZodString;
|
|
151
|
+
embedding: z.ZodArray<z.ZodNumber>;
|
|
152
|
+
vote: z.ZodOptional<z.ZodString>;
|
|
153
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
154
|
+
}, z.core.$strip>;
|
|
155
|
+
export type AgentState = z.infer<typeof AgentStateSchema>;
|
|
156
|
+
export declare const ConsensusInputSchema: z.ZodObject<{
|
|
157
|
+
agentStates: z.ZodArray<z.ZodObject<{
|
|
158
|
+
agentId: z.ZodString;
|
|
159
|
+
embedding: z.ZodArray<z.ZodNumber>;
|
|
160
|
+
vote: z.ZodOptional<z.ZodString>;
|
|
161
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
162
|
+
}, z.core.$strip>>;
|
|
163
|
+
threshold: z.ZodDefault<z.ZodNumber>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type ConsensusInput = z.infer<typeof ConsensusInputSchema>;
|
|
166
|
+
export interface ConsensusOutput {
|
|
167
|
+
verified: boolean;
|
|
168
|
+
coherenceScore: number;
|
|
169
|
+
divergentAgents: string[];
|
|
170
|
+
details: {
|
|
171
|
+
agreementRatio: number;
|
|
172
|
+
coherenceEnergy: number;
|
|
173
|
+
spectralStability: boolean;
|
|
174
|
+
spectralGap: number;
|
|
175
|
+
interpretation: string;
|
|
176
|
+
agentCount: number;
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
export declare const SimplexSchema: z.ZodObject<{
|
|
180
|
+
vertices: z.ZodArray<z.ZodNumber>;
|
|
181
|
+
dimension: z.ZodNumber;
|
|
182
|
+
}, z.core.$strip>;
|
|
183
|
+
export type Simplex = z.infer<typeof SimplexSchema>;
|
|
184
|
+
export declare const SimplicialComplexSchema: z.ZodObject<{
|
|
185
|
+
vertices: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
186
|
+
simplices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
187
|
+
vertices: z.ZodArray<z.ZodNumber>;
|
|
188
|
+
dimension: z.ZodNumber;
|
|
189
|
+
}, z.core.$strip>>>;
|
|
190
|
+
maxDimension: z.ZodDefault<z.ZodNumber>;
|
|
191
|
+
}, z.core.$strip>;
|
|
192
|
+
export type SimplicialComplex = z.infer<typeof SimplicialComplexSchema>;
|
|
193
|
+
export declare const TopologyInputSchema: z.ZodObject<{
|
|
194
|
+
complex: z.ZodObject<{
|
|
195
|
+
vertices: z.ZodArray<z.ZodArray<z.ZodNumber>>;
|
|
196
|
+
simplices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
197
|
+
vertices: z.ZodArray<z.ZodNumber>;
|
|
198
|
+
dimension: z.ZodNumber;
|
|
199
|
+
}, z.core.$strip>>>;
|
|
200
|
+
maxDimension: z.ZodDefault<z.ZodNumber>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
}, z.core.$strip>;
|
|
203
|
+
export type TopologyInput = z.infer<typeof TopologyInputSchema>;
|
|
204
|
+
export interface TopologyResult {
|
|
205
|
+
bettiNumbers: number[];
|
|
206
|
+
persistenceDiagram: [number, number][];
|
|
207
|
+
homologyClasses: number;
|
|
208
|
+
}
|
|
209
|
+
export interface TopologyOutput {
|
|
210
|
+
bettiNumbers: number[];
|
|
211
|
+
persistenceDiagram: {
|
|
212
|
+
birth: number;
|
|
213
|
+
death: number;
|
|
214
|
+
dimension: number;
|
|
215
|
+
}[];
|
|
216
|
+
details: {
|
|
217
|
+
homologyClasses: number;
|
|
218
|
+
interpretation: {
|
|
219
|
+
b0: string;
|
|
220
|
+
b1: string;
|
|
221
|
+
b2: string;
|
|
222
|
+
};
|
|
223
|
+
vertexCount: number;
|
|
224
|
+
maxDimension: number;
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
export declare const MemoryGateInputSchema: z.ZodObject<{
|
|
228
|
+
key: z.ZodString;
|
|
229
|
+
value: z.ZodUnknown;
|
|
230
|
+
existingVectors: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber>>>;
|
|
231
|
+
thresholds: z.ZodOptional<z.ZodObject<{
|
|
232
|
+
reject: z.ZodDefault<z.ZodNumber>;
|
|
233
|
+
warn: z.ZodDefault<z.ZodNumber>;
|
|
234
|
+
}, z.core.$strip>>;
|
|
235
|
+
}, z.core.$strip>;
|
|
236
|
+
export type MemoryGateInput = z.infer<typeof MemoryGateInputSchema>;
|
|
237
|
+
export interface MemoryGateOutput {
|
|
238
|
+
allowed: boolean;
|
|
239
|
+
coherenceEnergy: number;
|
|
240
|
+
reason?: string;
|
|
241
|
+
details: {
|
|
242
|
+
action: 'allow' | 'warn' | 'reject';
|
|
243
|
+
violations: string[];
|
|
244
|
+
confidence: number;
|
|
245
|
+
interpretation: string;
|
|
246
|
+
contextSize: number;
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
export interface PerformanceMetrics {
|
|
250
|
+
operationName: string;
|
|
251
|
+
startTime: number;
|
|
252
|
+
endTime: number;
|
|
253
|
+
duration: number;
|
|
254
|
+
success: boolean;
|
|
255
|
+
inputSize?: number;
|
|
256
|
+
error?: string;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* Create a successful MCP tool result
|
|
260
|
+
*/
|
|
261
|
+
export declare function successResult(data: unknown): MCPToolResult;
|
|
262
|
+
/**
|
|
263
|
+
* Create an error MCP tool result
|
|
264
|
+
*/
|
|
265
|
+
export declare function errorResult(error: Error | string): MCPToolResult;
|
|
266
|
+
/**
|
|
267
|
+
* Track performance metrics
|
|
268
|
+
*/
|
|
269
|
+
export declare function trackPerformance<T>(operationName: string, operation: () => T | Promise<T>): Promise<{
|
|
270
|
+
result: T;
|
|
271
|
+
metrics: PerformanceMetrics;
|
|
272
|
+
}>;
|
|
273
|
+
/**
|
|
274
|
+
* Calculate cosine similarity between two vectors
|
|
275
|
+
*/
|
|
276
|
+
export declare function cosineSimilarity(a: number[] | Float32Array, b: number[] | Float32Array): number;
|
|
277
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/mcp-tools/coherence/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;QACpC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC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