@monoes/monomindcli 2.7.4 → 2.7.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.
- package/bin/cli.js +17 -1
- package/dist/src/commands/doctor-project-checks.d.ts +3 -0
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +81 -8
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +16 -2
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/memory-crud.d.ts.map +1 -1
- package/dist/src/commands/memory-crud.js +15 -5
- package/dist/src/commands/memory-crud.js.map +1 -1
- package/dist/src/commands/security-misc.d.ts.map +1 -1
- package/dist/src/commands/security-misc.js +7 -2
- package/dist/src/commands/security-misc.js.map +1 -1
- package/dist/src/init/helpers-generator.d.ts.map +1 -1
- package/dist/src/init/helpers-generator.js +5 -0
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +0 -2
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/agent-tools.js +1 -1
- package/dist/src/mcp-tools/agent-tools.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.d.ts +2 -0
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +11 -1
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +17 -17
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts +2 -0
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +14 -2
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -1
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -1
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +1 -2
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +1 -1
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/swarm-tools.js +2 -2
- package/dist/src/mcp-tools/swarm-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts +2 -0
- package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +11 -1
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/ui/dashboard.html +44 -618
- package/dist/src/ui/server.mjs +0 -275
- package/dist/src/utils/cosine-similarity.d.ts +2 -2
- package/dist/src/utils/cosine-similarity.js +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/src/mcp-tools/coherence/causal-infer.d.ts +0 -15
- package/dist/src/mcp-tools/coherence/causal-infer.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/causal-infer.js +0 -333
- package/dist/src/mcp-tools/coherence/causal-infer.js.map +0 -1
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts +0 -15
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/coherence-check.js +0 -188
- package/dist/src/mcp-tools/coherence/coherence-check.js.map +0 -1
- package/dist/src/mcp-tools/coherence/consensus-verify.d.ts +0 -14
- package/dist/src/mcp-tools/coherence/consensus-verify.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/consensus-verify.js +0 -305
- package/dist/src/mcp-tools/coherence/consensus-verify.js.map +0 -1
- package/dist/src/mcp-tools/coherence/memory-gate.d.ts +0 -16
- package/dist/src/mcp-tools/coherence/memory-gate.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/memory-gate.js +0 -279
- package/dist/src/mcp-tools/coherence/memory-gate.js.map +0 -1
- package/dist/src/mcp-tools/coherence/quantum-topology.d.ts +0 -15
- package/dist/src/mcp-tools/coherence/quantum-topology.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/quantum-topology.js +0 -400
- package/dist/src/mcp-tools/coherence/quantum-topology.js.map +0 -1
- package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +0 -14
- package/dist/src/mcp-tools/coherence/spectral-analyze.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/spectral-analyze.js +0 -312
- package/dist/src/mcp-tools/coherence/spectral-analyze.js.map +0 -1
- package/dist/src/mcp-tools/coherence/types.d.ts +0 -430
- package/dist/src/mcp-tools/coherence/types.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence/types.js +0 -144
- package/dist/src/mcp-tools/coherence/types.js.map +0 -1
- package/dist/src/mcp-tools/coherence-tools.d.ts +0 -9
- package/dist/src/mcp-tools/coherence-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/coherence-tools.js +0 -25
- package/dist/src/mcp-tools/coherence-tools.js.map +0 -1
- package/dist/src/mcp-tools/daa-tools.d.ts +0 -13
- package/dist/src/mcp-tools/daa-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/daa-tools.js +0 -553
- package/dist/src/mcp-tools/daa-tools.js.map +0 -1
|
@@ -1,430 +0,0 @@
|
|
|
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, "many">, "many">;
|
|
70
|
-
threshold: z.ZodDefault<z.ZodNumber>;
|
|
71
|
-
}, "strip", z.ZodTypeAny, {
|
|
72
|
-
vectors: number[][];
|
|
73
|
-
threshold: number;
|
|
74
|
-
}, {
|
|
75
|
-
vectors: number[][];
|
|
76
|
-
threshold?: number | undefined;
|
|
77
|
-
}>;
|
|
78
|
-
export type CoherenceInput = z.infer<typeof CoherenceInputSchema>;
|
|
79
|
-
export interface CoherenceResult {
|
|
80
|
-
coherent: boolean;
|
|
81
|
-
energy: number;
|
|
82
|
-
violations: string[];
|
|
83
|
-
confidence: number;
|
|
84
|
-
}
|
|
85
|
-
export interface CoherenceOutput {
|
|
86
|
-
energy: number;
|
|
87
|
-
isCoherent: boolean;
|
|
88
|
-
details: {
|
|
89
|
-
violations: string[];
|
|
90
|
-
confidence: number;
|
|
91
|
-
interpretation: string;
|
|
92
|
-
vectorCount: number;
|
|
93
|
-
threshold: number;
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
export declare const SpectralInputSchema: z.ZodObject<{
|
|
97
|
-
matrix: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
98
|
-
analyzeType: z.ZodDefault<z.ZodEnum<["stability", "clustering", "connectivity"]>>;
|
|
99
|
-
}, "strip", z.ZodTypeAny, {
|
|
100
|
-
matrix: number[][];
|
|
101
|
-
analyzeType: "clustering" | "connectivity" | "stability";
|
|
102
|
-
}, {
|
|
103
|
-
matrix: number[][];
|
|
104
|
-
analyzeType?: "clustering" | "connectivity" | "stability" | undefined;
|
|
105
|
-
}>;
|
|
106
|
-
export type SpectralInput = z.infer<typeof SpectralInputSchema>;
|
|
107
|
-
export interface SpectralResult {
|
|
108
|
-
stable: boolean;
|
|
109
|
-
eigenvalues: number[];
|
|
110
|
-
spectralGap: number;
|
|
111
|
-
stabilityIndex: number;
|
|
112
|
-
}
|
|
113
|
-
export interface SpectralOutput {
|
|
114
|
-
spectralGap: number;
|
|
115
|
-
eigenvalues: number[];
|
|
116
|
-
stable: boolean;
|
|
117
|
-
details: {
|
|
118
|
-
stabilityIndex: number;
|
|
119
|
-
interpretation: string;
|
|
120
|
-
matrixSize: number;
|
|
121
|
-
analyzeType: string;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
export declare const CausalGraphSchema: z.ZodObject<{
|
|
125
|
-
nodes: z.ZodArray<z.ZodString, "many">;
|
|
126
|
-
edges: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
127
|
-
}, "strip", z.ZodTypeAny, {
|
|
128
|
-
nodes: string[];
|
|
129
|
-
edges: [string, string][];
|
|
130
|
-
}, {
|
|
131
|
-
nodes: string[];
|
|
132
|
-
edges: [string, string][];
|
|
133
|
-
}>;
|
|
134
|
-
export type CausalGraph = z.infer<typeof CausalGraphSchema>;
|
|
135
|
-
export declare const CausalInputSchema: z.ZodObject<{
|
|
136
|
-
graph: z.ZodObject<{
|
|
137
|
-
nodes: z.ZodArray<z.ZodString, "many">;
|
|
138
|
-
edges: z.ZodArray<z.ZodTuple<[z.ZodString, z.ZodString], null>, "many">;
|
|
139
|
-
}, "strip", z.ZodTypeAny, {
|
|
140
|
-
nodes: string[];
|
|
141
|
-
edges: [string, string][];
|
|
142
|
-
}, {
|
|
143
|
-
nodes: string[];
|
|
144
|
-
edges: [string, string][];
|
|
145
|
-
}>;
|
|
146
|
-
intervention: z.ZodString;
|
|
147
|
-
outcome: z.ZodString;
|
|
148
|
-
}, "strip", z.ZodTypeAny, {
|
|
149
|
-
graph: {
|
|
150
|
-
nodes: string[];
|
|
151
|
-
edges: [string, string][];
|
|
152
|
-
};
|
|
153
|
-
intervention: string;
|
|
154
|
-
outcome: string;
|
|
155
|
-
}, {
|
|
156
|
-
graph: {
|
|
157
|
-
nodes: string[];
|
|
158
|
-
edges: [string, string][];
|
|
159
|
-
};
|
|
160
|
-
intervention: string;
|
|
161
|
-
outcome: string;
|
|
162
|
-
}>;
|
|
163
|
-
export type CausalInput = z.infer<typeof CausalInputSchema>;
|
|
164
|
-
export interface CausalResult {
|
|
165
|
-
confounders: string[];
|
|
166
|
-
interventionValid: boolean;
|
|
167
|
-
backdoorPaths: string[][];
|
|
168
|
-
}
|
|
169
|
-
export interface CausalOutput {
|
|
170
|
-
identifiability: number;
|
|
171
|
-
backdoorPaths: string[];
|
|
172
|
-
details: {
|
|
173
|
-
confounders: string[];
|
|
174
|
-
interventionValid: boolean;
|
|
175
|
-
interpretation: string;
|
|
176
|
-
nodeCount: number;
|
|
177
|
-
edgeCount: number;
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
export declare const AgentStateSchema: z.ZodObject<{
|
|
181
|
-
agentId: z.ZodString;
|
|
182
|
-
embedding: z.ZodArray<z.ZodNumber, "many">;
|
|
183
|
-
vote: z.ZodOptional<z.ZodString>;
|
|
184
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
185
|
-
}, "strip", z.ZodTypeAny, {
|
|
186
|
-
agentId: string;
|
|
187
|
-
embedding: number[];
|
|
188
|
-
vote?: string | undefined;
|
|
189
|
-
metadata?: Record<string, unknown> | undefined;
|
|
190
|
-
}, {
|
|
191
|
-
agentId: string;
|
|
192
|
-
embedding: number[];
|
|
193
|
-
vote?: string | undefined;
|
|
194
|
-
metadata?: Record<string, unknown> | undefined;
|
|
195
|
-
}>;
|
|
196
|
-
export type AgentState = z.infer<typeof AgentStateSchema>;
|
|
197
|
-
export declare const ConsensusInputSchema: z.ZodObject<{
|
|
198
|
-
agentStates: z.ZodArray<z.ZodObject<{
|
|
199
|
-
agentId: z.ZodString;
|
|
200
|
-
embedding: z.ZodArray<z.ZodNumber, "many">;
|
|
201
|
-
vote: z.ZodOptional<z.ZodString>;
|
|
202
|
-
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
203
|
-
}, "strip", z.ZodTypeAny, {
|
|
204
|
-
agentId: string;
|
|
205
|
-
embedding: number[];
|
|
206
|
-
vote?: string | undefined;
|
|
207
|
-
metadata?: Record<string, unknown> | undefined;
|
|
208
|
-
}, {
|
|
209
|
-
agentId: string;
|
|
210
|
-
embedding: number[];
|
|
211
|
-
vote?: string | undefined;
|
|
212
|
-
metadata?: Record<string, unknown> | undefined;
|
|
213
|
-
}>, "many">;
|
|
214
|
-
threshold: z.ZodDefault<z.ZodNumber>;
|
|
215
|
-
}, "strip", z.ZodTypeAny, {
|
|
216
|
-
agentStates: {
|
|
217
|
-
agentId: string;
|
|
218
|
-
embedding: number[];
|
|
219
|
-
vote?: string | undefined;
|
|
220
|
-
metadata?: Record<string, unknown> | undefined;
|
|
221
|
-
}[];
|
|
222
|
-
threshold: number;
|
|
223
|
-
}, {
|
|
224
|
-
agentStates: {
|
|
225
|
-
agentId: string;
|
|
226
|
-
embedding: number[];
|
|
227
|
-
vote?: string | undefined;
|
|
228
|
-
metadata?: Record<string, unknown> | undefined;
|
|
229
|
-
}[];
|
|
230
|
-
threshold?: number | undefined;
|
|
231
|
-
}>;
|
|
232
|
-
export type ConsensusInput = z.infer<typeof ConsensusInputSchema>;
|
|
233
|
-
export interface ConsensusOutput {
|
|
234
|
-
verified: boolean;
|
|
235
|
-
coherenceScore: number;
|
|
236
|
-
divergentAgents: string[];
|
|
237
|
-
details: {
|
|
238
|
-
agreementRatio: number;
|
|
239
|
-
coherenceEnergy: number;
|
|
240
|
-
connectivityStable: boolean;
|
|
241
|
-
degreeRatio: number;
|
|
242
|
-
interpretation: string;
|
|
243
|
-
agentCount: number;
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
export declare const SimplexSchema: z.ZodObject<{
|
|
247
|
-
vertices: z.ZodArray<z.ZodNumber, "many">;
|
|
248
|
-
dimension: z.ZodNumber;
|
|
249
|
-
}, "strip", z.ZodTypeAny, {
|
|
250
|
-
vertices: number[];
|
|
251
|
-
dimension: number;
|
|
252
|
-
}, {
|
|
253
|
-
vertices: number[];
|
|
254
|
-
dimension: number;
|
|
255
|
-
}>;
|
|
256
|
-
export type Simplex = z.infer<typeof SimplexSchema>;
|
|
257
|
-
export declare const SimplicialComplexSchema: z.ZodObject<{
|
|
258
|
-
vertices: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
259
|
-
simplices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
260
|
-
vertices: z.ZodArray<z.ZodNumber, "many">;
|
|
261
|
-
dimension: z.ZodNumber;
|
|
262
|
-
}, "strip", z.ZodTypeAny, {
|
|
263
|
-
vertices: number[];
|
|
264
|
-
dimension: number;
|
|
265
|
-
}, {
|
|
266
|
-
vertices: number[];
|
|
267
|
-
dimension: number;
|
|
268
|
-
}>, "many">>;
|
|
269
|
-
maxDimension: z.ZodDefault<z.ZodNumber>;
|
|
270
|
-
}, "strip", z.ZodTypeAny, {
|
|
271
|
-
vertices: number[][];
|
|
272
|
-
simplices?: {
|
|
273
|
-
vertices: number[];
|
|
274
|
-
dimension: number;
|
|
275
|
-
}[] | undefined;
|
|
276
|
-
maxDimension: number;
|
|
277
|
-
}, {
|
|
278
|
-
vertices: number[][];
|
|
279
|
-
simplices?: {
|
|
280
|
-
vertices: number[];
|
|
281
|
-
dimension: number;
|
|
282
|
-
}[] | undefined;
|
|
283
|
-
maxDimension?: number | undefined;
|
|
284
|
-
}>;
|
|
285
|
-
export type SimplicialComplex = z.infer<typeof SimplicialComplexSchema>;
|
|
286
|
-
export declare const TopologyInputSchema: z.ZodObject<{
|
|
287
|
-
complex: z.ZodObject<{
|
|
288
|
-
vertices: z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">;
|
|
289
|
-
simplices: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
290
|
-
vertices: z.ZodArray<z.ZodNumber, "many">;
|
|
291
|
-
dimension: z.ZodNumber;
|
|
292
|
-
}, "strip", z.ZodTypeAny, {
|
|
293
|
-
vertices: number[];
|
|
294
|
-
dimension: number;
|
|
295
|
-
}, {
|
|
296
|
-
vertices: number[];
|
|
297
|
-
dimension: number;
|
|
298
|
-
}>, "many">>;
|
|
299
|
-
maxDimension: z.ZodDefault<z.ZodNumber>;
|
|
300
|
-
}, "strip", z.ZodTypeAny, {
|
|
301
|
-
vertices: number[][];
|
|
302
|
-
simplices?: {
|
|
303
|
-
vertices: number[];
|
|
304
|
-
dimension: number;
|
|
305
|
-
}[] | undefined;
|
|
306
|
-
maxDimension: number;
|
|
307
|
-
}, {
|
|
308
|
-
vertices: number[][];
|
|
309
|
-
simplices?: {
|
|
310
|
-
vertices: number[];
|
|
311
|
-
dimension: number;
|
|
312
|
-
}[] | undefined;
|
|
313
|
-
maxDimension?: number | undefined;
|
|
314
|
-
}>;
|
|
315
|
-
}, "strip", z.ZodTypeAny, {
|
|
316
|
-
complex: {
|
|
317
|
-
vertices: number[][];
|
|
318
|
-
simplices?: {
|
|
319
|
-
vertices: number[];
|
|
320
|
-
dimension: number;
|
|
321
|
-
}[] | undefined;
|
|
322
|
-
maxDimension: number;
|
|
323
|
-
};
|
|
324
|
-
}, {
|
|
325
|
-
complex: {
|
|
326
|
-
vertices: number[][];
|
|
327
|
-
simplices?: {
|
|
328
|
-
vertices: number[];
|
|
329
|
-
dimension: number;
|
|
330
|
-
}[] | undefined;
|
|
331
|
-
maxDimension?: number | undefined;
|
|
332
|
-
};
|
|
333
|
-
}>;
|
|
334
|
-
export type TopologyInput = z.infer<typeof TopologyInputSchema>;
|
|
335
|
-
export interface TopologyResult {
|
|
336
|
-
bettiNumbers: number[];
|
|
337
|
-
persistenceDiagram: [number, number][];
|
|
338
|
-
homologyClasses: number;
|
|
339
|
-
}
|
|
340
|
-
export interface TopologyOutput {
|
|
341
|
-
bettiNumbers: number[];
|
|
342
|
-
persistenceDiagram: {
|
|
343
|
-
birth: number;
|
|
344
|
-
death: number;
|
|
345
|
-
dimension: number;
|
|
346
|
-
}[];
|
|
347
|
-
details: {
|
|
348
|
-
homologyClasses: number;
|
|
349
|
-
interpretation: {
|
|
350
|
-
b0: string;
|
|
351
|
-
b1: string;
|
|
352
|
-
};
|
|
353
|
-
vertexCount: number;
|
|
354
|
-
maxDimension: number;
|
|
355
|
-
};
|
|
356
|
-
}
|
|
357
|
-
export declare const MemoryGateInputSchema: z.ZodObject<{
|
|
358
|
-
key: z.ZodString;
|
|
359
|
-
value: z.ZodUnknown;
|
|
360
|
-
existingVectors: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodNumber, "many">, "many">>;
|
|
361
|
-
thresholds: z.ZodOptional<z.ZodObject<{
|
|
362
|
-
reject: z.ZodDefault<z.ZodNumber>;
|
|
363
|
-
warn: z.ZodDefault<z.ZodNumber>;
|
|
364
|
-
}, "strip", z.ZodTypeAny, {
|
|
365
|
-
reject: number;
|
|
366
|
-
warn: number;
|
|
367
|
-
}, {
|
|
368
|
-
reject?: number | undefined;
|
|
369
|
-
warn?: number | undefined;
|
|
370
|
-
}>>;
|
|
371
|
-
}, "strip", z.ZodTypeAny, {
|
|
372
|
-
key: string;
|
|
373
|
-
value?: unknown;
|
|
374
|
-
existingVectors?: number[][] | undefined;
|
|
375
|
-
thresholds?: {
|
|
376
|
-
reject: number;
|
|
377
|
-
warn: number;
|
|
378
|
-
} | undefined;
|
|
379
|
-
}, {
|
|
380
|
-
key: string;
|
|
381
|
-
value?: unknown;
|
|
382
|
-
existingVectors?: number[][] | undefined;
|
|
383
|
-
thresholds?: {
|
|
384
|
-
reject?: number | undefined;
|
|
385
|
-
warn?: number | undefined;
|
|
386
|
-
} | undefined;
|
|
387
|
-
}>;
|
|
388
|
-
export type MemoryGateInput = z.infer<typeof MemoryGateInputSchema>;
|
|
389
|
-
export interface MemoryGateOutput {
|
|
390
|
-
allowed: boolean;
|
|
391
|
-
coherenceEnergy: number;
|
|
392
|
-
reason?: string;
|
|
393
|
-
details: {
|
|
394
|
-
action: 'allow' | 'warn' | 'reject';
|
|
395
|
-
violations: string[];
|
|
396
|
-
confidence: number;
|
|
397
|
-
interpretation: string;
|
|
398
|
-
contextSize: number;
|
|
399
|
-
};
|
|
400
|
-
}
|
|
401
|
-
export interface PerformanceMetrics {
|
|
402
|
-
operationName: string;
|
|
403
|
-
startTime: number;
|
|
404
|
-
endTime: number;
|
|
405
|
-
duration: number;
|
|
406
|
-
success: boolean;
|
|
407
|
-
inputSize?: number;
|
|
408
|
-
error?: string;
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Create a successful MCP tool result
|
|
412
|
-
*/
|
|
413
|
-
export declare function successResult(data: unknown): MCPToolResult;
|
|
414
|
-
/**
|
|
415
|
-
* Create an error MCP tool result
|
|
416
|
-
*/
|
|
417
|
-
export declare function errorResult(error: Error | string): MCPToolResult;
|
|
418
|
-
/**
|
|
419
|
-
* Track performance metrics
|
|
420
|
-
*/
|
|
421
|
-
export declare function trackPerformance<T>(operationName: string, operation: () => T | Promise<T>): Promise<{
|
|
422
|
-
result: T;
|
|
423
|
-
metrics: PerformanceMetrics;
|
|
424
|
-
}>;
|
|
425
|
-
/**
|
|
426
|
-
* Cosine similarity — re-exported from shared utility.
|
|
427
|
-
* Callers that already import from this module continue to work unchanged.
|
|
428
|
-
*/
|
|
429
|
-
export { cosineSimilarity } from '../../utils/cosine-similarity.js';
|
|
430
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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;AAM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,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE;QACP,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;QACpC,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAMD,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAMD;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,aAAa,CAO1D;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,GAAG,MAAM,GAAG,aAAa,CAahE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,EAChC,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,GAC9B,OAAO,CAAC;IAAE,MAAM,EAAE,CAAC,CAAC;IAAC,OAAO,EAAE,kBAAkB,CAAA;CAAE,CAAC,CAgCrD;AAED;;;GAGG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC"}
|
|
@@ -1,144 +0,0 @@
|
|
|
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
|
-
* Cosine similarity — re-exported from shared utility.
|
|
141
|
-
* Callers that already import from this module continue to work unchanged.
|
|
142
|
-
*/
|
|
143
|
-
export { cosineSimilarity } from '../../utils/cosine-similarity.js';
|
|
144
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.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,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coherence Tools — built-in coherence MCP tools
|
|
3
|
-
*
|
|
4
|
-
* Wraps all 6 tools for coherence check, spectral, causal, consensus, topology, memory gate
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Coherence Tools — built-in coherence MCP tools
|
|
3
|
-
*
|
|
4
|
-
* Wraps all 6 tools for coherence check, spectral, causal, consensus, topology, memory gate
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* DAA (Decentralized Autonomous Agents) MCP Tools for CLI
|
|
3
|
-
*
|
|
4
|
-
* V2 Compatibility - DAA agent management tools
|
|
5
|
-
*
|
|
6
|
-
* ⚠️ IMPORTANT: These tools provide LOCAL STATE MANAGEMENT.
|
|
7
|
-
* - Agent coordination is tracked locally
|
|
8
|
-
* - No distributed network communication
|
|
9
|
-
* - Useful for workflow orchestration and state tracking
|
|
10
|
-
*/
|
|
11
|
-
import type { MCPTool } from './types.js';
|
|
12
|
-
export declare const daaTools: MCPTool[];
|
|
13
|
-
//# sourceMappingURL=daa-tools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"daa-tools.d.ts","sourceRoot":"","sources":["../../../src/mcp-tools/daa-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AA6G1C,eAAO,MAAM,QAAQ,EAAE,OAAO,EAof7B,CAAC"}
|