@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,159 @@
1
+ /**
2
+ * Prime Radiant MCP Tool Types
3
+ *
4
+ * Type definitions for Prime Radiant mathematical AI tools.
5
+ */
6
+ import { z } from 'zod';
7
+ // ============================================================================
8
+ // Coherence Types
9
+ // ============================================================================
10
+ export const CoherenceInputSchema = z.object({
11
+ vectors: z.array(z.array(z.number())).min(1).describe('Array of embedding vectors to check for coherence'),
12
+ threshold: z.number().min(0).max(1).default(0.3).describe('Energy threshold for coherence (0-1)'),
13
+ });
14
+ // ============================================================================
15
+ // Spectral Types
16
+ // ============================================================================
17
+ export const SpectralInputSchema = z.object({
18
+ matrix: z.array(z.array(z.number())).min(1).describe('Adjacency matrix representing connections'),
19
+ analyzeType: z.enum(['stability', 'clustering', 'connectivity']).default('stability'),
20
+ });
21
+ // ============================================================================
22
+ // Causal Types
23
+ // ============================================================================
24
+ export const CausalGraphSchema = z.object({
25
+ nodes: z.array(z.string()).min(1).describe('List of variable names'),
26
+ edges: z.array(z.tuple([z.string(), z.string()])).describe('Directed edges as [from, to] pairs'),
27
+ });
28
+ export const CausalInputSchema = z.object({
29
+ graph: CausalGraphSchema.describe('Causal graph with nodes and edges'),
30
+ intervention: z.string().describe('Treatment/intervention variable'),
31
+ outcome: z.string().describe('Outcome variable to measure effect on'),
32
+ });
33
+ // ============================================================================
34
+ // Consensus Types
35
+ // ============================================================================
36
+ export const AgentStateSchema = z.object({
37
+ agentId: z.string().describe('Unique agent identifier'),
38
+ embedding: z.array(z.number()).describe('Agent state embedding vector'),
39
+ vote: z.string().optional().describe('Agent vote or decision'),
40
+ metadata: z.record(z.string(), z.unknown()).optional().describe('Additional agent metadata'),
41
+ });
42
+ export const ConsensusInputSchema = z.object({
43
+ agentStates: z.array(AgentStateSchema).min(1).describe('Array of agent states to verify consensus'),
44
+ threshold: z.number().min(0).max(1).default(0.8).describe('Required agreement threshold (0-1)'),
45
+ });
46
+ // ============================================================================
47
+ // Topology Types
48
+ // ============================================================================
49
+ export const SimplexSchema = z.object({
50
+ vertices: z.array(z.number()).describe('Vertex indices forming the simplex'),
51
+ dimension: z.number().int().min(0).describe('Dimension of the simplex'),
52
+ });
53
+ export const SimplicialComplexSchema = z.object({
54
+ vertices: z.array(z.array(z.number())).describe('Vertex coordinates'),
55
+ simplices: z.array(SimplexSchema).optional().describe('Explicit simplices (if not provided, computed from vertices)'),
56
+ maxDimension: z.number().int().min(0).max(3).default(2).describe('Maximum homology dimension to compute'),
57
+ });
58
+ export const TopologyInputSchema = z.object({
59
+ complex: SimplicialComplexSchema.describe('Simplicial complex for topological analysis'),
60
+ });
61
+ // ============================================================================
62
+ // Memory Gate Types
63
+ // ============================================================================
64
+ export const MemoryGateInputSchema = z.object({
65
+ key: z.string().describe('Memory entry key'),
66
+ value: z.unknown().describe('Value to be stored'),
67
+ existingVectors: z.array(z.array(z.number())).optional().describe('Existing context embeddings'),
68
+ thresholds: z.object({
69
+ reject: z.number().min(0).max(1).default(0.7),
70
+ warn: z.number().min(0).max(1).default(0.3),
71
+ }).optional().describe('Custom coherence thresholds'),
72
+ });
73
+ // ============================================================================
74
+ // Helper Functions
75
+ // ============================================================================
76
+ /**
77
+ * Create a successful MCP tool result
78
+ */
79
+ export function successResult(data) {
80
+ return {
81
+ content: [{
82
+ type: 'text',
83
+ text: JSON.stringify(data, null, 2),
84
+ }],
85
+ };
86
+ }
87
+ /**
88
+ * Create an error MCP tool result
89
+ */
90
+ export function errorResult(error) {
91
+ const message = error instanceof Error ? error.message : error;
92
+ return {
93
+ content: [{
94
+ type: 'text',
95
+ text: JSON.stringify({
96
+ error: true,
97
+ message,
98
+ timestamp: new Date().toISOString(),
99
+ }, null, 2),
100
+ }],
101
+ isError: true,
102
+ };
103
+ }
104
+ /**
105
+ * Track performance metrics
106
+ */
107
+ export function trackPerformance(operationName, operation) {
108
+ const startTime = performance.now();
109
+ return Promise.resolve()
110
+ .then(() => operation())
111
+ .then((result) => {
112
+ const endTime = performance.now();
113
+ return {
114
+ result,
115
+ metrics: {
116
+ operationName,
117
+ startTime,
118
+ endTime,
119
+ duration: endTime - startTime,
120
+ success: true,
121
+ },
122
+ };
123
+ })
124
+ .catch((error) => {
125
+ const endTime = performance.now();
126
+ throw {
127
+ error,
128
+ metrics: {
129
+ operationName,
130
+ startTime,
131
+ endTime,
132
+ duration: endTime - startTime,
133
+ success: false,
134
+ error: error instanceof Error ? error.message : String(error),
135
+ },
136
+ };
137
+ });
138
+ }
139
+ /**
140
+ * Calculate cosine similarity between two vectors
141
+ */
142
+ export function cosineSimilarity(a, b) {
143
+ if (a.length !== b.length) {
144
+ throw new Error(`Vector length mismatch: ${a.length} vs ${b.length}`);
145
+ }
146
+ let dotProduct = 0;
147
+ let normA = 0;
148
+ let normB = 0;
149
+ for (let i = 0; i < a.length; i++) {
150
+ dotProduct += a[i] * b[i];
151
+ normA += a[i] * a[i];
152
+ normB += b[i] * b[i];
153
+ }
154
+ const denominator = Math.sqrt(normA) * Math.sqrt(normB);
155
+ if (denominator === 0)
156
+ return 0;
157
+ return dotProduct / denominator;
158
+ }
159
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/mcp-tools/coherence/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAkFxB,+EAA+E;AAC/E,kBAAkB;AAClB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC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IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACxD,IAAI,WAAW,KAAK,CAAC;QAAE,OAAO,CAAC,CAAC;IAEhC,OAAO,UAAU,GAAG,WAAW,CAAC;AAClC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Coherence Tools — migrated from packages/plugins/prime-radiant
3
+ *
4
+ * Wraps all 6 prime-radiant tools as CLI MCPTool entries with renamed names
5
+ * (coherence_*). Their inputSchemas are already plain JSON Schema.
6
+ */
7
+ import type { MCPTool } from './types.js';
8
+ export declare const coherenceTools: MCPTool[];
9
+ //# sourceMappingURL=coherence-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coherence-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/coherence-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAa1C,eAAO,MAAM,cAAc,EAAE,OAAO,EAOnC,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * Coherence Tools — migrated from packages/plugins/prime-radiant
3
+ *
4
+ * Wraps all 6 prime-radiant tools as CLI MCPTool entries with renamed names
5
+ * (coherence_*). Their inputSchemas are already plain JSON Schema.
6
+ */
7
+ import { coherenceCheckTool } from './coherence/coherence-check.js';
8
+ import { spectralAnalyzeTool } from './coherence/spectral-analyze.js';
9
+ import { causalInferTool } from './coherence/causal-infer.js';
10
+ import { consensusVerifyTool } from './coherence/consensus-verify.js';
11
+ import { quantumTopologyTool } from './coherence/quantum-topology.js';
12
+ import { memoryGateTool } from './coherence/memory-gate.js';
13
+ // monolean: remap name only; all other fields (inputSchema, handler, etc.) reused as-is
14
+ function renamed(tool, name) {
15
+ return { ...tool, name };
16
+ }
17
+ export const coherenceTools = [
18
+ renamed(coherenceCheckTool, 'coherence_check'),
19
+ renamed(spectralAnalyzeTool, 'coherence_spectral'),
20
+ renamed(causalInferTool, 'coherence_causal'),
21
+ renamed(consensusVerifyTool, 'coherence_consensus'),
22
+ renamed(quantumTopologyTool, 'coherence_topology'),
23
+ renamed(memoryGateTool, 'coherence_memory_gate'),
24
+ ];
25
+ //# sourceMappingURL=coherence-tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coherence-tools.js","sourceRoot":"","sources":["../../../src/mcp-tools/coherence-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAE5D,wFAAwF;AACxF,SAAS,OAAO,CAAC,IAAa,EAAE,IAAY;IAC1C,OAAO,EAAE,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;AAC3B,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,OAAO,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IAC9C,OAAO,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;IAClD,OAAO,CAAC,eAAe,EAAE,kBAAkB,CAAC;IAC5C,OAAO,CAAC,mBAAmB,EAAE,qBAAqB,CAAC;IACnD,OAAO,CAAC,mBAAmB,EAAE,oBAAoB,CAAC;IAClD,OAAO,CAAC,cAAc,EAAE,uBAAuB,CAAC;CACjD,CAAC"}
@@ -0,0 +1,163 @@
1
+ /**
2
+ * chaos-inject.ts - Chaos failure injection MCP tool handler
3
+ *
4
+ * Injects controlled failures for resilience testing including network
5
+ * latency, process termination, resource exhaustion, and more.
6
+ * Includes dryRun safety mode.
7
+ */
8
+ import { z } from 'zod';
9
+ export declare const ChaosInjectInputSchema: z.ZodObject<{
10
+ target: z.ZodString;
11
+ failureType: z.ZodEnum<{
12
+ "network-latency": "network-latency";
13
+ "network-partition": "network-partition";
14
+ "cpu-stress": "cpu-stress";
15
+ "memory-pressure": "memory-pressure";
16
+ "disk-failure": "disk-failure";
17
+ "process-kill": "process-kill";
18
+ "dns-failure": "dns-failure";
19
+ "dependency-failure": "dependency-failure";
20
+ "clock-skew": "clock-skew";
21
+ "packet-loss": "packet-loss";
22
+ }>;
23
+ duration: z.ZodDefault<z.ZodNumber>;
24
+ intensity: z.ZodDefault<z.ZodNumber>;
25
+ dryRun: z.ZodDefault<z.ZodBoolean>;
26
+ rollbackOnFailure: z.ZodDefault<z.ZodBoolean>;
27
+ monitorMetrics: z.ZodDefault<z.ZodBoolean>;
28
+ notifyChannels: z.ZodDefault<z.ZodArray<z.ZodString>>;
29
+ parameters: z.ZodOptional<z.ZodObject<{
30
+ latencyMs: z.ZodOptional<z.ZodNumber>;
31
+ packetLossPercent: z.ZodOptional<z.ZodNumber>;
32
+ cpuCores: z.ZodOptional<z.ZodNumber>;
33
+ memoryPercent: z.ZodOptional<z.ZodNumber>;
34
+ targetProcesses: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ }, z.core.$strip>>;
36
+ }, z.core.$strip>;
37
+ export type ChaosInjectInput = z.infer<typeof ChaosInjectInputSchema>;
38
+ export interface ChaosInjectOutput {
39
+ success: boolean;
40
+ experimentId: string;
41
+ status: ExperimentStatus;
42
+ injection: InjectionDetails;
43
+ impact: ImpactAssessment;
44
+ metrics: ChaosMetrics;
45
+ timeline: TimelineEvent[];
46
+ recommendations: ChaosRecommendation[];
47
+ metadata: ChaosMetadata;
48
+ }
49
+ export interface ExperimentStatus {
50
+ state: 'planned' | 'running' | 'completed' | 'aborted' | 'dry-run';
51
+ progress: number;
52
+ startTime: string | null;
53
+ endTime: string | null;
54
+ rollbackRequired: boolean;
55
+ rollbackCompleted: boolean;
56
+ }
57
+ export interface InjectionDetails {
58
+ type: string;
59
+ target: string;
60
+ intensity: number;
61
+ duration: number;
62
+ parameters: Record<string, unknown>;
63
+ affectedComponents: string[];
64
+ }
65
+ export interface ImpactAssessment {
66
+ severity: 'none' | 'low' | 'medium' | 'high' | 'critical';
67
+ systemsAffected: string[];
68
+ usersAffected: number;
69
+ recoveryTime: number;
70
+ dataLoss: boolean;
71
+ serviceDisruption: ServiceDisruption;
72
+ }
73
+ export interface ServiceDisruption {
74
+ totalRequests: number;
75
+ failedRequests: number;
76
+ errorRate: number;
77
+ avgLatency: number;
78
+ p99Latency: number;
79
+ }
80
+ export interface ChaosMetrics {
81
+ baseline: MetricSnapshot;
82
+ duringChaos: MetricSnapshot;
83
+ afterChaos: MetricSnapshot;
84
+ degradation: number;
85
+ recoveryTime: number;
86
+ }
87
+ export interface MetricSnapshot {
88
+ timestamp: string;
89
+ cpu: number;
90
+ memory: number;
91
+ networkLatency: number;
92
+ errorRate: number;
93
+ requestsPerSecond: number;
94
+ }
95
+ export interface TimelineEvent {
96
+ timestamp: string;
97
+ event: string;
98
+ type: 'info' | 'warning' | 'error' | 'recovery';
99
+ details: string;
100
+ }
101
+ export interface ChaosRecommendation {
102
+ category: 'resilience' | 'recovery' | 'monitoring' | 'configuration';
103
+ priority: 'high' | 'medium' | 'low';
104
+ finding: string;
105
+ recommendation: string;
106
+ evidence: string;
107
+ }
108
+ export interface ChaosMetadata {
109
+ experimentId: string;
110
+ createdAt: string;
111
+ completedAt: string | null;
112
+ dryRun: boolean;
113
+ version: string;
114
+ }
115
+ export interface ToolContext {
116
+ get<T>(key: string): T | undefined;
117
+ }
118
+ /**
119
+ * MCP Tool Handler for chaos-inject
120
+ */
121
+ export declare function handler(input: ChaosInjectInput, context: ToolContext): Promise<{
122
+ content: Array<{
123
+ type: 'text';
124
+ text: string;
125
+ }>;
126
+ }>;
127
+ export declare const toolDefinition: {
128
+ name: string;
129
+ description: string;
130
+ category: string;
131
+ version: string;
132
+ inputSchema: z.ZodObject<{
133
+ target: z.ZodString;
134
+ failureType: z.ZodEnum<{
135
+ "network-latency": "network-latency";
136
+ "network-partition": "network-partition";
137
+ "cpu-stress": "cpu-stress";
138
+ "memory-pressure": "memory-pressure";
139
+ "disk-failure": "disk-failure";
140
+ "process-kill": "process-kill";
141
+ "dns-failure": "dns-failure";
142
+ "dependency-failure": "dependency-failure";
143
+ "clock-skew": "clock-skew";
144
+ "packet-loss": "packet-loss";
145
+ }>;
146
+ duration: z.ZodDefault<z.ZodNumber>;
147
+ intensity: z.ZodDefault<z.ZodNumber>;
148
+ dryRun: z.ZodDefault<z.ZodBoolean>;
149
+ rollbackOnFailure: z.ZodDefault<z.ZodBoolean>;
150
+ monitorMetrics: z.ZodDefault<z.ZodBoolean>;
151
+ notifyChannels: z.ZodDefault<z.ZodArray<z.ZodString>>;
152
+ parameters: z.ZodOptional<z.ZodObject<{
153
+ latencyMs: z.ZodOptional<z.ZodNumber>;
154
+ packetLossPercent: z.ZodOptional<z.ZodNumber>;
155
+ cpuCores: z.ZodOptional<z.ZodNumber>;
156
+ memoryPercent: z.ZodOptional<z.ZodNumber>;
157
+ targetProcesses: z.ZodOptional<z.ZodArray<z.ZodString>>;
158
+ }, z.core.$strip>>;
159
+ }, z.core.$strip>;
160
+ handler: typeof handler;
161
+ };
162
+ export default toolDefinition;
163
+ //# sourceMappingURL=chaos-inject.d.ts.map
@@ -0,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