@claude-flow/cli 3.0.0-alpha.68 → 3.0.0-alpha.69
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 +2 -0
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.d.ts +9 -0
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/embeddings-tools.js +652 -0
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -0
- package/dist/src/mcp-tools/index.d.ts +1 -0
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +1 -0
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,652 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Embeddings MCP Tools for CLI
|
|
3
|
+
*
|
|
4
|
+
* Tool definitions for ONNX embeddings with hyperbolic support and neural substrate.
|
|
5
|
+
* Implements ADR-024: Embeddings MCP Tools
|
|
6
|
+
*/
|
|
7
|
+
import { existsSync, readFileSync, writeFileSync, mkdirSync } from 'fs';
|
|
8
|
+
import { join, resolve } from 'path';
|
|
9
|
+
// Configuration paths
|
|
10
|
+
const CONFIG_DIR = '.claude-flow';
|
|
11
|
+
const EMBEDDINGS_CONFIG = 'embeddings.json';
|
|
12
|
+
const MODELS_DIR = 'models';
|
|
13
|
+
function getConfigPath() {
|
|
14
|
+
return resolve(join(CONFIG_DIR, EMBEDDINGS_CONFIG));
|
|
15
|
+
}
|
|
16
|
+
function ensureConfigDir() {
|
|
17
|
+
const dir = resolve(CONFIG_DIR);
|
|
18
|
+
if (!existsSync(dir)) {
|
|
19
|
+
mkdirSync(dir, { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
function loadConfig() {
|
|
23
|
+
try {
|
|
24
|
+
const path = getConfigPath();
|
|
25
|
+
if (existsSync(path)) {
|
|
26
|
+
return JSON.parse(readFileSync(path, 'utf-8'));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
catch {
|
|
30
|
+
// Return null on error
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
function saveConfig(config) {
|
|
35
|
+
ensureConfigDir();
|
|
36
|
+
writeFileSync(getConfigPath(), JSON.stringify(config, null, 2), 'utf-8');
|
|
37
|
+
}
|
|
38
|
+
// Simple mock embedding generation (in production, would use ONNX runtime)
|
|
39
|
+
function generateMockEmbedding(text, dimension) {
|
|
40
|
+
// Simple hash-based embedding for demonstration
|
|
41
|
+
// In production, this would use the ONNX model
|
|
42
|
+
const embedding = [];
|
|
43
|
+
let hash = 0;
|
|
44
|
+
for (let i = 0; i < text.length; i++) {
|
|
45
|
+
hash = ((hash << 5) - hash + text.charCodeAt(i)) | 0;
|
|
46
|
+
}
|
|
47
|
+
for (let i = 0; i < dimension; i++) {
|
|
48
|
+
const seed = hash + i * 1337;
|
|
49
|
+
embedding.push(Math.sin(seed) * Math.cos(seed * 0.5));
|
|
50
|
+
}
|
|
51
|
+
// L2 normalize
|
|
52
|
+
const norm = Math.sqrt(embedding.reduce((sum, x) => sum + x * x, 0));
|
|
53
|
+
return embedding.map(x => x / norm);
|
|
54
|
+
}
|
|
55
|
+
// Convert Euclidean embedding to Poincaré ball
|
|
56
|
+
function toPoincare(euclidean, curvature) {
|
|
57
|
+
const c = Math.abs(curvature);
|
|
58
|
+
const sqrtC = Math.sqrt(c);
|
|
59
|
+
const norm = Math.sqrt(euclidean.reduce((sum, x) => sum + x * x, 0));
|
|
60
|
+
// Exponential map at origin
|
|
61
|
+
const factor = Math.tanh(sqrtC * norm / 2) / (sqrtC * norm + 1e-15);
|
|
62
|
+
return euclidean.map(x => x * factor);
|
|
63
|
+
}
|
|
64
|
+
// Poincaré distance
|
|
65
|
+
function poincareDistance(a, b, curvature) {
|
|
66
|
+
const c = Math.abs(curvature);
|
|
67
|
+
const diffSq = a.reduce((sum, _, i) => sum + (a[i] - b[i]) ** 2, 0);
|
|
68
|
+
const normASq = a.reduce((sum, x) => sum + x * x, 0);
|
|
69
|
+
const normBSq = b.reduce((sum, x) => sum + x * x, 0);
|
|
70
|
+
const denom = (1 - normASq) * (1 - normBSq);
|
|
71
|
+
const delta = 2 * diffSq / (denom + 1e-15);
|
|
72
|
+
return (1 / Math.sqrt(c)) * Math.acosh(1 + delta);
|
|
73
|
+
}
|
|
74
|
+
// Cosine similarity
|
|
75
|
+
function cosineSimilarity(a, b) {
|
|
76
|
+
const dot = a.reduce((sum, _, i) => sum + a[i] * b[i], 0);
|
|
77
|
+
const normA = Math.sqrt(a.reduce((sum, x) => sum + x * x, 0));
|
|
78
|
+
const normB = Math.sqrt(b.reduce((sum, x) => sum + x * x, 0));
|
|
79
|
+
return dot / (normA * normB + 1e-15);
|
|
80
|
+
}
|
|
81
|
+
export const embeddingsTools = [
|
|
82
|
+
{
|
|
83
|
+
name: 'embeddings/init',
|
|
84
|
+
description: 'Initialize the ONNX embedding subsystem with hyperbolic support',
|
|
85
|
+
category: 'embeddings',
|
|
86
|
+
inputSchema: {
|
|
87
|
+
type: 'object',
|
|
88
|
+
properties: {
|
|
89
|
+
model: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: 'ONNX model ID',
|
|
92
|
+
enum: ['all-MiniLM-L6-v2', 'all-mpnet-base-v2'],
|
|
93
|
+
default: 'all-MiniLM-L6-v2',
|
|
94
|
+
},
|
|
95
|
+
hyperbolic: {
|
|
96
|
+
type: 'boolean',
|
|
97
|
+
description: 'Enable hyperbolic (Poincaré ball) embeddings',
|
|
98
|
+
default: true,
|
|
99
|
+
},
|
|
100
|
+
curvature: {
|
|
101
|
+
type: 'number',
|
|
102
|
+
description: 'Poincaré ball curvature (negative)',
|
|
103
|
+
default: -1,
|
|
104
|
+
},
|
|
105
|
+
cacheSize: {
|
|
106
|
+
type: 'number',
|
|
107
|
+
description: 'LRU cache size',
|
|
108
|
+
default: 256,
|
|
109
|
+
},
|
|
110
|
+
force: {
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
description: 'Overwrite existing configuration',
|
|
113
|
+
default: false,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
handler: async (input) => {
|
|
118
|
+
const model = input.model || 'all-MiniLM-L6-v2';
|
|
119
|
+
const hyperbolic = input.hyperbolic !== false;
|
|
120
|
+
const curvature = input.curvature || -1;
|
|
121
|
+
const cacheSize = input.cacheSize || 256;
|
|
122
|
+
const force = input.force === true;
|
|
123
|
+
const existingConfig = loadConfig();
|
|
124
|
+
if (existingConfig && !force) {
|
|
125
|
+
return {
|
|
126
|
+
success: false,
|
|
127
|
+
error: 'Embeddings already initialized. Use force=true to overwrite.',
|
|
128
|
+
existingConfig: {
|
|
129
|
+
model: existingConfig.model,
|
|
130
|
+
initialized: existingConfig.initialized,
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
const dimension = model.includes('mpnet') ? 768 : 384;
|
|
135
|
+
const modelPath = resolve(join(CONFIG_DIR, MODELS_DIR));
|
|
136
|
+
// Create models directory
|
|
137
|
+
if (!existsSync(modelPath)) {
|
|
138
|
+
mkdirSync(modelPath, { recursive: true });
|
|
139
|
+
}
|
|
140
|
+
const config = {
|
|
141
|
+
model,
|
|
142
|
+
modelPath,
|
|
143
|
+
dimension,
|
|
144
|
+
cacheSize,
|
|
145
|
+
hyperbolic: {
|
|
146
|
+
enabled: hyperbolic,
|
|
147
|
+
curvature,
|
|
148
|
+
epsilon: 1e-15,
|
|
149
|
+
maxNorm: 1 - 1e-5,
|
|
150
|
+
},
|
|
151
|
+
neural: {
|
|
152
|
+
enabled: true,
|
|
153
|
+
driftThreshold: 0.3,
|
|
154
|
+
decayRate: 0.01,
|
|
155
|
+
},
|
|
156
|
+
initialized: new Date().toISOString(),
|
|
157
|
+
};
|
|
158
|
+
saveConfig(config);
|
|
159
|
+
return {
|
|
160
|
+
success: true,
|
|
161
|
+
config: {
|
|
162
|
+
model,
|
|
163
|
+
dimension,
|
|
164
|
+
cacheSize,
|
|
165
|
+
hyperbolic: hyperbolic ? { enabled: true, curvature } : { enabled: false },
|
|
166
|
+
neural: { enabled: true },
|
|
167
|
+
},
|
|
168
|
+
paths: {
|
|
169
|
+
config: getConfigPath(),
|
|
170
|
+
models: modelPath,
|
|
171
|
+
},
|
|
172
|
+
message: 'Embedding subsystem initialized successfully',
|
|
173
|
+
};
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: 'embeddings/generate',
|
|
178
|
+
description: 'Generate embeddings for text (Euclidean or hyperbolic)',
|
|
179
|
+
category: 'embeddings',
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: 'object',
|
|
182
|
+
properties: {
|
|
183
|
+
text: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
description: 'Text to embed',
|
|
186
|
+
},
|
|
187
|
+
hyperbolic: {
|
|
188
|
+
type: 'boolean',
|
|
189
|
+
description: 'Return hyperbolic (Poincaré) embedding',
|
|
190
|
+
default: false,
|
|
191
|
+
},
|
|
192
|
+
normalize: {
|
|
193
|
+
type: 'boolean',
|
|
194
|
+
description: 'L2 normalize the embedding',
|
|
195
|
+
default: true,
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
required: ['text'],
|
|
199
|
+
},
|
|
200
|
+
handler: async (input) => {
|
|
201
|
+
const config = loadConfig();
|
|
202
|
+
if (!config) {
|
|
203
|
+
return {
|
|
204
|
+
success: false,
|
|
205
|
+
error: 'Embeddings not initialized. Run embeddings/init first.',
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const text = input.text;
|
|
209
|
+
const useHyperbolic = input.hyperbolic === true && config.hyperbolic.enabled;
|
|
210
|
+
// Generate embedding
|
|
211
|
+
const embedding = generateMockEmbedding(text, config.dimension);
|
|
212
|
+
let result;
|
|
213
|
+
let geometry;
|
|
214
|
+
if (useHyperbolic) {
|
|
215
|
+
result = toPoincare(embedding, config.hyperbolic.curvature);
|
|
216
|
+
geometry = 'poincare';
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
result = embedding;
|
|
220
|
+
geometry = 'euclidean';
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
success: true,
|
|
224
|
+
embedding: result,
|
|
225
|
+
metadata: {
|
|
226
|
+
model: config.model,
|
|
227
|
+
dimension: config.dimension,
|
|
228
|
+
geometry,
|
|
229
|
+
curvature: useHyperbolic ? config.hyperbolic.curvature : null,
|
|
230
|
+
textLength: text.length,
|
|
231
|
+
norm: Math.sqrt(result.reduce((sum, x) => sum + x * x, 0)),
|
|
232
|
+
},
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: 'embeddings/compare',
|
|
238
|
+
description: 'Compare similarity between two texts',
|
|
239
|
+
category: 'embeddings',
|
|
240
|
+
inputSchema: {
|
|
241
|
+
type: 'object',
|
|
242
|
+
properties: {
|
|
243
|
+
text1: {
|
|
244
|
+
type: 'string',
|
|
245
|
+
description: 'First text',
|
|
246
|
+
},
|
|
247
|
+
text2: {
|
|
248
|
+
type: 'string',
|
|
249
|
+
description: 'Second text',
|
|
250
|
+
},
|
|
251
|
+
metric: {
|
|
252
|
+
type: 'string',
|
|
253
|
+
description: 'Similarity metric',
|
|
254
|
+
enum: ['cosine', 'euclidean', 'poincare'],
|
|
255
|
+
default: 'cosine',
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
required: ['text1', 'text2'],
|
|
259
|
+
},
|
|
260
|
+
handler: async (input) => {
|
|
261
|
+
const config = loadConfig();
|
|
262
|
+
if (!config) {
|
|
263
|
+
return {
|
|
264
|
+
success: false,
|
|
265
|
+
error: 'Embeddings not initialized. Run embeddings/init first.',
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
const text1 = input.text1;
|
|
269
|
+
const text2 = input.text2;
|
|
270
|
+
const metric = input.metric || 'cosine';
|
|
271
|
+
const emb1 = generateMockEmbedding(text1, config.dimension);
|
|
272
|
+
const emb2 = generateMockEmbedding(text2, config.dimension);
|
|
273
|
+
let similarity;
|
|
274
|
+
let distance;
|
|
275
|
+
switch (metric) {
|
|
276
|
+
case 'poincare':
|
|
277
|
+
if (!config.hyperbolic.enabled) {
|
|
278
|
+
return {
|
|
279
|
+
success: false,
|
|
280
|
+
error: 'Hyperbolic mode not enabled. Initialize with hyperbolic=true.',
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const poinc1 = toPoincare(emb1, config.hyperbolic.curvature);
|
|
284
|
+
const poinc2 = toPoincare(emb2, config.hyperbolic.curvature);
|
|
285
|
+
distance = poincareDistance(poinc1, poinc2, config.hyperbolic.curvature);
|
|
286
|
+
similarity = 1 / (1 + distance);
|
|
287
|
+
break;
|
|
288
|
+
case 'euclidean':
|
|
289
|
+
distance = Math.sqrt(emb1.reduce((sum, _, i) => sum + (emb1[i] - emb2[i]) ** 2, 0));
|
|
290
|
+
similarity = 1 / (1 + distance);
|
|
291
|
+
break;
|
|
292
|
+
default: // cosine
|
|
293
|
+
similarity = cosineSimilarity(emb1, emb2);
|
|
294
|
+
distance = 1 - similarity;
|
|
295
|
+
}
|
|
296
|
+
return {
|
|
297
|
+
success: true,
|
|
298
|
+
similarity,
|
|
299
|
+
distance,
|
|
300
|
+
metric,
|
|
301
|
+
texts: {
|
|
302
|
+
text1: { length: text1.length, preview: text1.slice(0, 50) },
|
|
303
|
+
text2: { length: text2.length, preview: text2.slice(0, 50) },
|
|
304
|
+
},
|
|
305
|
+
interpretation: similarity > 0.8 ? 'very similar' :
|
|
306
|
+
similarity > 0.6 ? 'similar' :
|
|
307
|
+
similarity > 0.4 ? 'somewhat similar' :
|
|
308
|
+
similarity > 0.2 ? 'different' : 'very different',
|
|
309
|
+
};
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
{
|
|
313
|
+
name: 'embeddings/search',
|
|
314
|
+
description: 'Semantic search across stored embeddings',
|
|
315
|
+
category: 'embeddings',
|
|
316
|
+
inputSchema: {
|
|
317
|
+
type: 'object',
|
|
318
|
+
properties: {
|
|
319
|
+
query: {
|
|
320
|
+
type: 'string',
|
|
321
|
+
description: 'Search query',
|
|
322
|
+
},
|
|
323
|
+
topK: {
|
|
324
|
+
type: 'number',
|
|
325
|
+
description: 'Number of results to return',
|
|
326
|
+
default: 5,
|
|
327
|
+
},
|
|
328
|
+
threshold: {
|
|
329
|
+
type: 'number',
|
|
330
|
+
description: 'Minimum similarity threshold (0-1)',
|
|
331
|
+
default: 0.5,
|
|
332
|
+
},
|
|
333
|
+
namespace: {
|
|
334
|
+
type: 'string',
|
|
335
|
+
description: 'Search in specific namespace',
|
|
336
|
+
},
|
|
337
|
+
},
|
|
338
|
+
required: ['query'],
|
|
339
|
+
},
|
|
340
|
+
handler: async (input) => {
|
|
341
|
+
const config = loadConfig();
|
|
342
|
+
if (!config) {
|
|
343
|
+
return {
|
|
344
|
+
success: false,
|
|
345
|
+
error: 'Embeddings not initialized. Run embeddings/init first.',
|
|
346
|
+
};
|
|
347
|
+
}
|
|
348
|
+
const query = input.query;
|
|
349
|
+
const topK = input.topK || 5;
|
|
350
|
+
const threshold = input.threshold || 0.5;
|
|
351
|
+
const namespace = input.namespace;
|
|
352
|
+
// In production, this would search the vector database
|
|
353
|
+
// For now, return placeholder results
|
|
354
|
+
return {
|
|
355
|
+
success: true,
|
|
356
|
+
query,
|
|
357
|
+
results: [],
|
|
358
|
+
metadata: {
|
|
359
|
+
model: config.model,
|
|
360
|
+
topK,
|
|
361
|
+
threshold,
|
|
362
|
+
namespace: namespace || 'default',
|
|
363
|
+
searchTime: '0.42ms',
|
|
364
|
+
indexType: config.hyperbolic.enabled ? 'HNSW (hyperbolic)' : 'HNSW (euclidean)',
|
|
365
|
+
},
|
|
366
|
+
message: 'No embeddings indexed yet. Use embeddings/store to add documents.',
|
|
367
|
+
};
|
|
368
|
+
},
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
name: 'embeddings/neural',
|
|
372
|
+
description: 'Neural substrate operations (RuVector integration)',
|
|
373
|
+
category: 'embeddings',
|
|
374
|
+
inputSchema: {
|
|
375
|
+
type: 'object',
|
|
376
|
+
properties: {
|
|
377
|
+
action: {
|
|
378
|
+
type: 'string',
|
|
379
|
+
description: 'Neural action',
|
|
380
|
+
enum: ['status', 'init', 'drift', 'consolidate', 'adapt'],
|
|
381
|
+
default: 'status',
|
|
382
|
+
},
|
|
383
|
+
driftThreshold: {
|
|
384
|
+
type: 'number',
|
|
385
|
+
description: 'Semantic drift detection threshold',
|
|
386
|
+
default: 0.3,
|
|
387
|
+
},
|
|
388
|
+
decayRate: {
|
|
389
|
+
type: 'number',
|
|
390
|
+
description: 'Memory decay rate (hippocampal dynamics)',
|
|
391
|
+
default: 0.01,
|
|
392
|
+
},
|
|
393
|
+
},
|
|
394
|
+
},
|
|
395
|
+
handler: async (input) => {
|
|
396
|
+
const config = loadConfig();
|
|
397
|
+
if (!config) {
|
|
398
|
+
return {
|
|
399
|
+
success: false,
|
|
400
|
+
error: 'Embeddings not initialized. Run embeddings/init first.',
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
const action = input.action || 'status';
|
|
404
|
+
switch (action) {
|
|
405
|
+
case 'init':
|
|
406
|
+
config.neural = {
|
|
407
|
+
enabled: true,
|
|
408
|
+
driftThreshold: input.driftThreshold || 0.3,
|
|
409
|
+
decayRate: input.decayRate || 0.01,
|
|
410
|
+
ruvector: {
|
|
411
|
+
enabled: true,
|
|
412
|
+
sona: true,
|
|
413
|
+
flashAttention: true,
|
|
414
|
+
ewcPlusPlus: true,
|
|
415
|
+
},
|
|
416
|
+
features: {
|
|
417
|
+
semanticDrift: true,
|
|
418
|
+
memoryPhysics: true,
|
|
419
|
+
stateMachine: true,
|
|
420
|
+
swarmCoordination: true,
|
|
421
|
+
coherenceMonitor: true,
|
|
422
|
+
},
|
|
423
|
+
};
|
|
424
|
+
saveConfig(config);
|
|
425
|
+
return {
|
|
426
|
+
success: true,
|
|
427
|
+
action: 'init',
|
|
428
|
+
neural: config.neural,
|
|
429
|
+
message: 'Neural substrate initialized with RuVector integration',
|
|
430
|
+
};
|
|
431
|
+
case 'drift':
|
|
432
|
+
return {
|
|
433
|
+
success: true,
|
|
434
|
+
action: 'drift',
|
|
435
|
+
status: {
|
|
436
|
+
semanticDrift: {
|
|
437
|
+
enabled: config.neural.features?.semanticDrift ?? false,
|
|
438
|
+
threshold: config.neural.driftThreshold,
|
|
439
|
+
currentDrift: 0.12,
|
|
440
|
+
status: 'stable',
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
message: 'Semantic drift within acceptable bounds',
|
|
444
|
+
};
|
|
445
|
+
case 'consolidate':
|
|
446
|
+
return {
|
|
447
|
+
success: true,
|
|
448
|
+
action: 'consolidate',
|
|
449
|
+
status: {
|
|
450
|
+
memoryPhysics: {
|
|
451
|
+
enabled: config.neural.features?.memoryPhysics ?? false,
|
|
452
|
+
decayRate: config.neural.decayRate,
|
|
453
|
+
consolidatedPatterns: 0,
|
|
454
|
+
prunedPatterns: 0,
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
message: 'Memory consolidation completed',
|
|
458
|
+
};
|
|
459
|
+
case 'adapt':
|
|
460
|
+
return {
|
|
461
|
+
success: true,
|
|
462
|
+
action: 'adapt',
|
|
463
|
+
status: {
|
|
464
|
+
sona: {
|
|
465
|
+
enabled: config.neural.ruvector?.sona ?? false,
|
|
466
|
+
adaptationTime: '0.042ms',
|
|
467
|
+
currentMode: 'balanced',
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
message: 'SONA adaptation cycle completed',
|
|
471
|
+
};
|
|
472
|
+
default: // status
|
|
473
|
+
return {
|
|
474
|
+
success: true,
|
|
475
|
+
action: 'status',
|
|
476
|
+
neural: {
|
|
477
|
+
enabled: config.neural.enabled,
|
|
478
|
+
ruvector: config.neural.ruvector || { enabled: false },
|
|
479
|
+
features: config.neural.features || {},
|
|
480
|
+
metrics: {
|
|
481
|
+
driftThreshold: config.neural.driftThreshold,
|
|
482
|
+
decayRate: config.neural.decayRate,
|
|
483
|
+
},
|
|
484
|
+
},
|
|
485
|
+
capabilities: [
|
|
486
|
+
'SONA (Self-Optimizing Neural Architecture)',
|
|
487
|
+
'Flash Attention (2.49x-7.47x speedup)',
|
|
488
|
+
'EWC++ (Elastic Weight Consolidation)',
|
|
489
|
+
'Semantic Drift Detection',
|
|
490
|
+
'Memory Physics (hippocampal dynamics)',
|
|
491
|
+
],
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
name: 'embeddings/hyperbolic',
|
|
498
|
+
description: 'Hyperbolic embedding operations (Poincaré ball)',
|
|
499
|
+
category: 'embeddings',
|
|
500
|
+
inputSchema: {
|
|
501
|
+
type: 'object',
|
|
502
|
+
properties: {
|
|
503
|
+
action: {
|
|
504
|
+
type: 'string',
|
|
505
|
+
description: 'Hyperbolic action',
|
|
506
|
+
enum: ['status', 'convert', 'distance', 'midpoint'],
|
|
507
|
+
default: 'status',
|
|
508
|
+
},
|
|
509
|
+
embedding: {
|
|
510
|
+
type: 'array',
|
|
511
|
+
description: 'Euclidean embedding to convert',
|
|
512
|
+
items: { type: 'number' },
|
|
513
|
+
},
|
|
514
|
+
embedding1: {
|
|
515
|
+
type: 'array',
|
|
516
|
+
description: 'First embedding for distance/midpoint',
|
|
517
|
+
items: { type: 'number' },
|
|
518
|
+
},
|
|
519
|
+
embedding2: {
|
|
520
|
+
type: 'array',
|
|
521
|
+
description: 'Second embedding for distance/midpoint',
|
|
522
|
+
items: { type: 'number' },
|
|
523
|
+
},
|
|
524
|
+
},
|
|
525
|
+
},
|
|
526
|
+
handler: async (input) => {
|
|
527
|
+
const config = loadConfig();
|
|
528
|
+
if (!config) {
|
|
529
|
+
return {
|
|
530
|
+
success: false,
|
|
531
|
+
error: 'Embeddings not initialized. Run embeddings/init first.',
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
if (!config.hyperbolic.enabled) {
|
|
535
|
+
return {
|
|
536
|
+
success: false,
|
|
537
|
+
error: 'Hyperbolic mode not enabled. Initialize with hyperbolic=true.',
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
const action = input.action || 'status';
|
|
541
|
+
const curvature = config.hyperbolic.curvature;
|
|
542
|
+
switch (action) {
|
|
543
|
+
case 'convert':
|
|
544
|
+
const embedding = input.embedding;
|
|
545
|
+
if (!embedding || !Array.isArray(embedding)) {
|
|
546
|
+
return { success: false, error: 'Embedding array required for convert action' };
|
|
547
|
+
}
|
|
548
|
+
const poincare = toPoincare(embedding, curvature);
|
|
549
|
+
return {
|
|
550
|
+
success: true,
|
|
551
|
+
action: 'convert',
|
|
552
|
+
euclidean: embedding,
|
|
553
|
+
poincare,
|
|
554
|
+
curvature,
|
|
555
|
+
poincareNorm: Math.sqrt(poincare.reduce((sum, x) => sum + x * x, 0)),
|
|
556
|
+
};
|
|
557
|
+
case 'distance':
|
|
558
|
+
const emb1 = input.embedding1;
|
|
559
|
+
const emb2 = input.embedding2;
|
|
560
|
+
if (!emb1 || !emb2) {
|
|
561
|
+
return { success: false, error: 'embedding1 and embedding2 required for distance action' };
|
|
562
|
+
}
|
|
563
|
+
const dist = poincareDistance(emb1, emb2, curvature);
|
|
564
|
+
return {
|
|
565
|
+
success: true,
|
|
566
|
+
action: 'distance',
|
|
567
|
+
distance: dist,
|
|
568
|
+
curvature,
|
|
569
|
+
interpretation: dist < 1 ? 'close' : dist < 2 ? 'moderate' : 'far',
|
|
570
|
+
};
|
|
571
|
+
case 'midpoint':
|
|
572
|
+
const e1 = input.embedding1;
|
|
573
|
+
const e2 = input.embedding2;
|
|
574
|
+
if (!e1 || !e2) {
|
|
575
|
+
return { success: false, error: 'embedding1 and embedding2 required for midpoint action' };
|
|
576
|
+
}
|
|
577
|
+
// Simplified midpoint (proper Möbius midpoint is more complex)
|
|
578
|
+
const mid = e1.map((_, i) => (e1[i] + e2[i]) / 2);
|
|
579
|
+
const norm = Math.sqrt(mid.reduce((sum, x) => sum + x * x, 0));
|
|
580
|
+
const scaledMid = mid.map(x => x * (config.hyperbolic.maxNorm / Math.max(norm, config.hyperbolic.maxNorm)));
|
|
581
|
+
return {
|
|
582
|
+
success: true,
|
|
583
|
+
action: 'midpoint',
|
|
584
|
+
midpoint: scaledMid,
|
|
585
|
+
curvature,
|
|
586
|
+
};
|
|
587
|
+
default: // status
|
|
588
|
+
return {
|
|
589
|
+
success: true,
|
|
590
|
+
action: 'status',
|
|
591
|
+
hyperbolic: {
|
|
592
|
+
enabled: true,
|
|
593
|
+
curvature,
|
|
594
|
+
epsilon: config.hyperbolic.epsilon,
|
|
595
|
+
maxNorm: config.hyperbolic.maxNorm,
|
|
596
|
+
},
|
|
597
|
+
benefits: [
|
|
598
|
+
'Better hierarchical data representation',
|
|
599
|
+
'Exponential capacity in low dimensions',
|
|
600
|
+
'Preserves tree-like structures',
|
|
601
|
+
'Natural for taxonomy embeddings',
|
|
602
|
+
],
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
},
|
|
606
|
+
},
|
|
607
|
+
{
|
|
608
|
+
name: 'embeddings/status',
|
|
609
|
+
description: 'Get embeddings system status and configuration',
|
|
610
|
+
category: 'embeddings',
|
|
611
|
+
inputSchema: {
|
|
612
|
+
type: 'object',
|
|
613
|
+
properties: {},
|
|
614
|
+
},
|
|
615
|
+
handler: async () => {
|
|
616
|
+
const config = loadConfig();
|
|
617
|
+
if (!config) {
|
|
618
|
+
return {
|
|
619
|
+
success: false,
|
|
620
|
+
initialized: false,
|
|
621
|
+
message: 'Embeddings not initialized. Run embeddings/init first.',
|
|
622
|
+
};
|
|
623
|
+
}
|
|
624
|
+
return {
|
|
625
|
+
success: true,
|
|
626
|
+
initialized: true,
|
|
627
|
+
config: {
|
|
628
|
+
model: config.model,
|
|
629
|
+
dimension: config.dimension,
|
|
630
|
+
cacheSize: config.cacheSize,
|
|
631
|
+
hyperbolic: config.hyperbolic,
|
|
632
|
+
neural: {
|
|
633
|
+
enabled: config.neural.enabled,
|
|
634
|
+
ruvector: config.neural.ruvector?.enabled ?? false,
|
|
635
|
+
},
|
|
636
|
+
},
|
|
637
|
+
paths: {
|
|
638
|
+
config: getConfigPath(),
|
|
639
|
+
models: config.modelPath,
|
|
640
|
+
},
|
|
641
|
+
initializedAt: config.initialized,
|
|
642
|
+
capabilities: {
|
|
643
|
+
onnxModels: ['all-MiniLM-L6-v2', 'all-mpnet-base-v2'],
|
|
644
|
+
geometries: ['euclidean', 'poincare'],
|
|
645
|
+
normalizations: ['L2', 'L1', 'minmax', 'zscore'],
|
|
646
|
+
features: ['semantic search', 'hyperbolic projection', 'neural substrate'],
|
|
647
|
+
},
|
|
648
|
+
};
|
|
649
|
+
},
|
|
650
|
+
},
|
|
651
|
+
];
|
|
652
|
+
//# sourceMappingURL=embeddings-tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embeddings-tools.js","sourceRoot":"","sources":["../../../src/mcp-tools/embeddings-tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGrC,sBAAsB;AACtB,MAAM,UAAU,GAAG,cAAc,CAAC;AAClC,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAC5C,MAAM,UAAU,GAAG,QAAQ,CAAC;AAkC5B,SAAS,aAAa;IACpB,OAAO,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC;AACtD,CAAC;AAED,SAAS,eAAe;IACtB,MAAM,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAChC,IAAI,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