@lotargo/memory_plugin 1.5.2 → 1.6.0
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/CHANGELOG.md +108 -0
- package/README.md +383 -352
- package/mcp-server/admin/auth.js +13 -4
- package/mcp-server/admin/snapshot.js +24 -7
- package/mcp-server/cli/direct_commands.js +334 -313
- package/mcp-server/cli/handlers/engine_actions.js +41 -0
- package/mcp-server/cli/handlers/storage_actions.js +58 -0
- package/mcp-server/cli/secret_input.js +44 -0
- package/mcp-server/cli/ui.js +564 -565
- package/mcp-server/cli.js +356 -324
- package/mcp-server/config/auth_store.js +74 -16
- package/mcp-server/config/config_manager.js +4 -0
- package/mcp-server/db/database.js +33 -14
- package/mcp-server/db/sync_queue.js +9 -19
- package/mcp-server/index.js +112 -42
- package/mcp-server/ingest/normalizer.js +116 -29
- package/mcp-server/ingest/pipeline.js +94 -6
- package/mcp-server/logger.js +49 -0
- package/mcp-server/memory.js +6 -9
- package/mcp-server/ml/gpu_monitor.js +169 -166
- package/mcp-server/ml/model_manager.js +17 -4
- package/mcp-server/retrieval/retriever.js +35 -15
- package/mcp-server/security/path_guard.js +67 -0
- package/mcp-server/setup.js +10 -2
- package/mcp-server/storage/blob_store.js +15 -2
- package/mcp-server/tools/core/memory_core.js +393 -0
- package/mcp-server/tools/helpers.js +59 -39
- package/mcp-server/tools/memory_tools.js +123 -506
- package/mcp-server/tools/rag_tools.js +49 -1
- package/opencode-plugin/index.js +95 -387
- package/package.json +7 -1
- package/skills/using-memory/SKILL.md +7 -2
package/mcp-server/cli/ui.js
CHANGED
|
@@ -1,565 +1,564 @@
|
|
|
1
|
-
import readline from "readline";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
"Xenova/multilingual-e5-
|
|
6
|
-
"Xenova/multilingual-e5-
|
|
7
|
-
"Xenova/
|
|
8
|
-
"Xenova/bge-
|
|
9
|
-
"Xenova/bge-
|
|
10
|
-
"Xenova/bge-
|
|
11
|
-
"Xenova/
|
|
12
|
-
"Xenova/all-
|
|
13
|
-
"Xenova/
|
|
14
|
-
"Xenova/
|
|
15
|
-
"Xenova/gte-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
"Xenova/bge-reranker-
|
|
22
|
-
"Xenova/
|
|
23
|
-
"Xenova/ms-marco-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
console.
|
|
31
|
-
console.log(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (p.status === "
|
|
56
|
-
else if (p.status === "
|
|
57
|
-
else if (p.status === "
|
|
58
|
-
else
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
console.log(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
if (rankStr
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
console.log(`
|
|
135
|
-
console.log(`
|
|
136
|
-
console.log(`
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
const
|
|
150
|
-
const
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
console.log(
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
console.log(
|
|
163
|
-
console.log(`
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
{ name: "
|
|
168
|
-
{ name: "
|
|
169
|
-
{ name: "Hybrid
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
const
|
|
179
|
-
const
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
results.winner === "
|
|
195
|
-
: results.winner === "
|
|
196
|
-
: results.winner === "
|
|
197
|
-
: results.winner
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
console.
|
|
218
|
-
console.log(
|
|
219
|
-
console.log(
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
const
|
|
224
|
-
const
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
process.stdin.
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
console.
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
if (
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
process.stdin.
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
console.
|
|
353
|
-
console.log(
|
|
354
|
-
console.log(
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
const
|
|
361
|
-
const
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
console.log(`
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
if (
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
process.stdin.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
console.
|
|
426
|
-
console.log(
|
|
427
|
-
console.log(
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
if (
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
process.stdin.
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
if (
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
process.stdin.
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
let
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
process.stdout.write(`\r > ${input}
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
if (
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
process.stdin.
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
}
|
|
1
|
+
import readline from "readline";
|
|
2
|
+
|
|
3
|
+
export const EMBEDDING_PRESETS = [
|
|
4
|
+
"Xenova/multilingual-e5-small",
|
|
5
|
+
"Xenova/multilingual-e5-base",
|
|
6
|
+
"Xenova/multilingual-e5-large",
|
|
7
|
+
"Xenova/bge-small-en-v1.5",
|
|
8
|
+
"Xenova/bge-base-en-v1.5",
|
|
9
|
+
"Xenova/bge-large-en-v1.5",
|
|
10
|
+
"Xenova/bge-m3",
|
|
11
|
+
"Xenova/all-MiniLM-L6-v2",
|
|
12
|
+
"Xenova/all-mpnet-base-v2",
|
|
13
|
+
"Xenova/paraphrase-multilingual-MiniLM-L12-v2",
|
|
14
|
+
"Xenova/gte-small",
|
|
15
|
+
"Xenova/gte-large",
|
|
16
|
+
];
|
|
17
|
+
|
|
18
|
+
export const RERANKER_PRESETS = [
|
|
19
|
+
"none",
|
|
20
|
+
"Xenova/bge-reranker-base",
|
|
21
|
+
"Xenova/bge-reranker-large",
|
|
22
|
+
"Xenova/ms-marco-MiniLM-L-6-v2",
|
|
23
|
+
"Xenova/ms-marco-TinyBERT-L-2-v2",
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
export const PANEL_WIDTH = 58;
|
|
27
|
+
|
|
28
|
+
export async function downloadModelWithProgress(modelName, type = "embedding") {
|
|
29
|
+
console.clear();
|
|
30
|
+
console.log(`\n MODEL DOWNLOAD & PRELOAD`);
|
|
31
|
+
console.log(` \x1b[90m${type.toUpperCase()}: ${modelName.substring(0, 36)}\x1b[0m\n`);
|
|
32
|
+
|
|
33
|
+
const spinFrames = ["|", "/", "-", "\\"];
|
|
34
|
+
let spinIdx = 0;
|
|
35
|
+
let lastProgress = 0;
|
|
36
|
+
|
|
37
|
+
const handleProgress = (p) => {
|
|
38
|
+
if (!p) return;
|
|
39
|
+
spinIdx = (spinIdx + 1) % spinFrames.length;
|
|
40
|
+
const spin = spinFrames[spinIdx];
|
|
41
|
+
|
|
42
|
+
const filename = p.file ? p.file.split("/").pop() : (p.name || "weights");
|
|
43
|
+
const pct = typeof p.progress === "number" ? Math.round(p.progress) : lastProgress;
|
|
44
|
+
if (typeof p.progress === "number") lastProgress = pct;
|
|
45
|
+
|
|
46
|
+
const loadedMB = p.loaded ? (p.loaded / (1024 * 1024)).toFixed(1) : "0.0";
|
|
47
|
+
const totalMB = p.total ? (p.total / (1024 * 1024)).toFixed(1) : "0.0";
|
|
48
|
+
|
|
49
|
+
const barLen = 18;
|
|
50
|
+
const filled = Math.round((pct / 100) * barLen);
|
|
51
|
+
const bar = "=".repeat(filled).padEnd(barLen);
|
|
52
|
+
|
|
53
|
+
let statusMsg = "";
|
|
54
|
+
if (p.status === "initiate") statusMsg = "Initiating...";
|
|
55
|
+
else if (p.status === "download" || p.status === "progress") statusMsg = `${pct}% (${loadedMB}/${totalMB} MB)`;
|
|
56
|
+
else if (p.status === "done") statusMsg = "Verifying...";
|
|
57
|
+
else if (p.status === "ready") statusMsg = "Ready!";
|
|
58
|
+
else statusMsg = `${pct}%`;
|
|
59
|
+
|
|
60
|
+
const fileLabel = filename.length > 18 ? filename.substring(0, 15) + "..." : filename;
|
|
61
|
+
process.stdout.write(`\r ${spin} [${bar}] ${fileLabel.padEnd(18)} ${statusMsg.padEnd(22)}`);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
try {
|
|
65
|
+
const { preloadModel } = await import("../ml/model_manager.js");
|
|
66
|
+
await preloadModel(modelName, type, handleProgress);
|
|
67
|
+
process.stdout.write("\r" + " ".repeat(72) + "\r");
|
|
68
|
+
console.log(` \x1b[32m[OK] Model "${modelName}" ready!\x1b[0m\n`);
|
|
69
|
+
} catch (err) {
|
|
70
|
+
process.stdout.write("\r" + " ".repeat(72) + "\r");
|
|
71
|
+
console.error(` \x1b[31m[ERROR] Download for "${modelName}" failed: ${err.message}\x1b[0m\n`);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function printHeaderPanel(title, stats) {
|
|
76
|
+
console.log(`\n \x1b[1m\x1b[37m${title}\x1b[0m`);
|
|
77
|
+
console.log(` \x1b[90mStorage: ${stats.docCount} Docs | ${stats.chunkCount} Chunks | ${stats.factCount} Facts\x1b[0m`);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function printQuickInfoBox(infoText) {
|
|
81
|
+
console.log(` \x1b[90mINFO: ${infoText}\x1b[0m\n`);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function padVisible(str, width, align = "left") {
|
|
85
|
+
const visibleLength = String(str).replace(/\x1b\[[0-9;]*m/g, "").length;
|
|
86
|
+
const padding = " ".repeat(Math.max(0, width - visibleLength));
|
|
87
|
+
return align === "right" ? padding + str : str + padding;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function formatRankColor(rankStr) {
|
|
91
|
+
if (rankStr === "#1") return "\x1b[1m\x1b[32m#1\x1b[0m";
|
|
92
|
+
if (rankStr.startsWith("#")) return `\x1b[33m${rankStr}\x1b[0m`;
|
|
93
|
+
return "\x1b[90mMISSED\x1b[0m";
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export function wrapText(text, width) {
|
|
97
|
+
if (!text || text.length <= width) return [text || ""];
|
|
98
|
+
const words = text.split(/\s+/);
|
|
99
|
+
const lines = [];
|
|
100
|
+
let currentLine = "";
|
|
101
|
+
|
|
102
|
+
for (const word of words) {
|
|
103
|
+
if (word.length > width) {
|
|
104
|
+
if (currentLine) {
|
|
105
|
+
lines.push(currentLine);
|
|
106
|
+
currentLine = "";
|
|
107
|
+
}
|
|
108
|
+
let rem = word;
|
|
109
|
+
while (rem.length > width) {
|
|
110
|
+
lines.push(rem.substring(0, width));
|
|
111
|
+
rem = rem.substring(width);
|
|
112
|
+
}
|
|
113
|
+
currentLine = rem;
|
|
114
|
+
} else if ((currentLine + (currentLine ? " " : "") + word).length <= width) {
|
|
115
|
+
currentLine += (currentLine ? " " : "") + word;
|
|
116
|
+
} else {
|
|
117
|
+
lines.push(currentLine);
|
|
118
|
+
currentLine = word;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (currentLine) lines.push(currentLine);
|
|
122
|
+
return lines;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export function renderPerQueryBreakdownTable(breakdown) {
|
|
126
|
+
if (!breakdown || breakdown.length === 0) return;
|
|
127
|
+
|
|
128
|
+
console.log(`\n PER-QUERY RESULTS BREAKDOWN (${breakdown.length} Queries)\n`);
|
|
129
|
+
|
|
130
|
+
breakdown.forEach((item, itemIdx) => {
|
|
131
|
+
const isMatch = item.topHit && (item.topHit === item.target || (item.expectedDocIds && item.expectedDocIds.includes(item.topHit)));
|
|
132
|
+
|
|
133
|
+
console.log(` ${item.id}. ${item.query}`);
|
|
134
|
+
console.log(` Target: \x1b[36m${item.target}\x1b[0m`);
|
|
135
|
+
console.log(` BM25: ${formatRankColor(item.bm25Rank)} Vector: ${formatRankColor(item.vectorRank)} RRF: ${formatRankColor(item.rrfRank)} RSF: ${formatRankColor(item.rsfRank)}`);
|
|
136
|
+
console.log(` Top Hit: ${isMatch ? "\x1b[32m" : "\x1b[33m"}${item.topHit || "NONE"}\x1b[0m`);
|
|
137
|
+
|
|
138
|
+
if (itemIdx < breakdown.length - 1) {
|
|
139
|
+
console.log("");
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
console.log("");
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function renderBenchmarkResultsTable(results) {
|
|
147
|
+
const isSmoke = results && results.mode === "smoke";
|
|
148
|
+
const title = isSmoke ? "SMOKE BENCHMARK RESULTS" : "SEARCH QUALITY BENCHMARK RESULTS";
|
|
149
|
+
const nQueries = results && results.bm25 ? results.bm25.n : 0;
|
|
150
|
+
const subtitle = isSmoke
|
|
151
|
+
? `Smoke: ${nQueries} queries (stats skipped, fast iteration)`
|
|
152
|
+
: `Evaluated over ${nQueries} challenging cross-lingual queries`;
|
|
153
|
+
|
|
154
|
+
console.log(`\n \x1b[1m\x1b[37m${title}\x1b[0m`);
|
|
155
|
+
console.log(` \x1b[90m${subtitle}\x1b[0m\n`);
|
|
156
|
+
|
|
157
|
+
if (results && results.breakdown) {
|
|
158
|
+
renderPerQueryBreakdownTable(results.breakdown);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
console.log(`\n METRIC COMPARISON BY SEARCH STRATEGY\n`);
|
|
162
|
+
console.log(` Strategy MRR@5 Recall@5 NDCG@5`);
|
|
163
|
+
console.log(` ${"─".repeat(50)}`);
|
|
164
|
+
|
|
165
|
+
const strategies = [
|
|
166
|
+
{ name: "BM25 Search Only", data: results.bm25, key: "bm25" },
|
|
167
|
+
{ name: "Dense ONNX Vector", data: results.vector, key: "vector" },
|
|
168
|
+
{ name: "Hybrid RRF (Rank)", data: results.hybridRrf, key: "hybrid_rrf" },
|
|
169
|
+
{ name: "Hybrid RSF (Score)", data: results.hybridRsf, key: "hybrid_rsf" },
|
|
170
|
+
];
|
|
171
|
+
|
|
172
|
+
const getMrr = (d) => (d ? (d.mrr ?? d.mrrAtK ?? 0) : 0);
|
|
173
|
+
const getRecall = (d) => (d ? (d.recall ?? d.recallAtK ?? 0) : 0);
|
|
174
|
+
const getNdcg = (d) => (d ? (d.ndcg ?? d.ndcgAtK ?? 0) : 0);
|
|
175
|
+
|
|
176
|
+
strategies.forEach((s) => {
|
|
177
|
+
const nameStr = s.name.padEnd(20);
|
|
178
|
+
const mrrStr = getMrr(s.data).toFixed(4).padEnd(10);
|
|
179
|
+
const recallPct = (getRecall(s.data) * 100).toFixed(1) + "%";
|
|
180
|
+
const recallStr = recallPct.padEnd(13);
|
|
181
|
+
const ndcgStr = getNdcg(s.data).toFixed(4);
|
|
182
|
+
|
|
183
|
+
const isBest = results.winner && s.key === results.winner;
|
|
184
|
+
const color = isBest ? "\x1b[1m\x1b[36m" : "\x1b[37m";
|
|
185
|
+
|
|
186
|
+
console.log(` ${color}${nameStr}${mrrStr}${recallStr}${ndcgStr}\x1b[0m`);
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
console.log("");
|
|
190
|
+
|
|
191
|
+
if (results && results.winner) {
|
|
192
|
+
const winnerLabel =
|
|
193
|
+
results.winner === "hybrid_rsf" ? "RSF"
|
|
194
|
+
: results.winner === "hybrid_rrf" ? "RRF"
|
|
195
|
+
: results.winner === "vector" ? "Vector"
|
|
196
|
+
: results.winner === "bm25" ? "BM25"
|
|
197
|
+
: results.winner;
|
|
198
|
+
const p = results.pairedTests && results.pairedTests.rrfVsRsf;
|
|
199
|
+
const sigNote = p
|
|
200
|
+
? (p.p < 0.05 ? ` (RRF vs RSF p=${p.p}, significant)` : ` (RRF vs RSF p=${p.p}, NOT significant at N=${p.n})`)
|
|
201
|
+
: (results.mode === "smoke" ? " (smoke: stats skipped)" : "");
|
|
202
|
+
console.log(` \x1b[90m Winner by MRR: \x1b[1m\x1b[36m${winnerLabel}\x1b[0m\x1b[90m${sigNote}\x1b[0m\n`);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function selectCategoryMenu({ title, stats, categories, initialIndex = 0 }) {
|
|
207
|
+
return new Promise((resolve) => {
|
|
208
|
+
let activeIndex = Math.min(Math.max(0, initialIndex), categories.length - 1);
|
|
209
|
+
|
|
210
|
+
if (process.stdin.isTTY) {
|
|
211
|
+
process.stdin.setRawMode(true);
|
|
212
|
+
}
|
|
213
|
+
process.stdin.resume();
|
|
214
|
+
|
|
215
|
+
function render() {
|
|
216
|
+
console.clear();
|
|
217
|
+
console.log(`\n ${title}\n`);
|
|
218
|
+
console.log(` Storage: ${stats.docCount} Docs | ${stats.chunkCount} Chunks | ${stats.factCount} Facts\n`);
|
|
219
|
+
console.log(" Controls: ↑ / ↓ - Navigate [ENTER] - Select [BACKSPACE] - Exit\n");
|
|
220
|
+
|
|
221
|
+
categories.forEach((cat, idx) => {
|
|
222
|
+
const isSelected = idx === activeIndex;
|
|
223
|
+
const pointer = isSelected ? " > " : " ";
|
|
224
|
+
const label = isSelected ? `\x1b[1m\x1b[36m${cat.label}\x1b[0m` : cat.label;
|
|
225
|
+
const hint = cat.hint ? ` \x1b[90m(${cat.hint})\x1b[0m` : "";
|
|
226
|
+
console.log(`${pointer}${label}${hint}`);
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
console.log("");
|
|
230
|
+
|
|
231
|
+
const activeCat = categories[activeIndex];
|
|
232
|
+
if (activeCat && activeCat.info) {
|
|
233
|
+
console.log(` \x1b[90m${activeCat.info}\x1b[0m\n`);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
render();
|
|
238
|
+
|
|
239
|
+
function onKeypress(str, key) {
|
|
240
|
+
if (!key) return;
|
|
241
|
+
if (key.ctrl && key.name === "c") {
|
|
242
|
+
cleanup();
|
|
243
|
+
process.exit(0);
|
|
244
|
+
}
|
|
245
|
+
if (key.name === "up") {
|
|
246
|
+
activeIndex = (activeIndex - 1 + categories.length) % categories.length;
|
|
247
|
+
render();
|
|
248
|
+
} else if (key.name === "down") {
|
|
249
|
+
activeIndex = (activeIndex + 1) % categories.length;
|
|
250
|
+
render();
|
|
251
|
+
} else if (key.name === "return") {
|
|
252
|
+
cleanup();
|
|
253
|
+
resolve({ action: "select", index: activeIndex, value: categories[activeIndex].value });
|
|
254
|
+
} else if (key.name === "backspace" || key.name === "escape" || key.name === "delete") {
|
|
255
|
+
cleanup();
|
|
256
|
+
resolve({ action: "back" });
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
function cleanup() {
|
|
261
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
262
|
+
if (process.stdin.isTTY) {
|
|
263
|
+
process.stdin.setRawMode(false);
|
|
264
|
+
}
|
|
265
|
+
process.stdin.pause();
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
process.stdin.on("keypress", onKeypress);
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export function selectSimpleMenu({ title, subtitle = "", items, initialIndex = 0 }) {
|
|
273
|
+
return new Promise((resolve) => {
|
|
274
|
+
let index = Math.min(Math.max(0, initialIndex), items.length - 1);
|
|
275
|
+
|
|
276
|
+
if (process.stdin.isTTY) {
|
|
277
|
+
process.stdin.setRawMode(true);
|
|
278
|
+
}
|
|
279
|
+
process.stdin.resume();
|
|
280
|
+
|
|
281
|
+
function render() {
|
|
282
|
+
console.clear();
|
|
283
|
+
console.log(`\n ${title}`);
|
|
284
|
+
if (subtitle) {
|
|
285
|
+
console.log(` \x1b[90m${subtitle}\x1b[0m`);
|
|
286
|
+
}
|
|
287
|
+
console.log("\n Controls: ↑ / ↓ - Navigate [ENTER] - Select [BACKSPACE] - Back\n");
|
|
288
|
+
|
|
289
|
+
items.forEach((item, idx) => {
|
|
290
|
+
const isSelected = idx === index;
|
|
291
|
+
const pointer = isSelected ? " > " : " ";
|
|
292
|
+
const label = isSelected ? `\x1b[1m\x1b[36m${item.label}\x1b[0m` : item.label;
|
|
293
|
+
const badge = item.badge ? ` \x1b[33m[${item.badge}]\x1b[0m` : "";
|
|
294
|
+
const hint = item.hint ? ` \x1b[90m(${item.hint})\x1b[0m` : "";
|
|
295
|
+
console.log(`${pointer}${label}${badge}${hint}`);
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
console.log("");
|
|
299
|
+
|
|
300
|
+
const activeItem = items[index];
|
|
301
|
+
if (activeItem && activeItem.info) {
|
|
302
|
+
console.log(` \x1b[90m${activeItem.info}\x1b[0m\n`);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
render();
|
|
307
|
+
|
|
308
|
+
function onKeypress(str, key) {
|
|
309
|
+
if (!key) return;
|
|
310
|
+
if (key.ctrl && key.name === "c") {
|
|
311
|
+
cleanup();
|
|
312
|
+
process.exit(0);
|
|
313
|
+
}
|
|
314
|
+
if (key.name === "up") {
|
|
315
|
+
index = (index - 1 + items.length) % items.length;
|
|
316
|
+
render();
|
|
317
|
+
} else if (key.name === "down") {
|
|
318
|
+
index = (index + 1) % items.length;
|
|
319
|
+
render();
|
|
320
|
+
} else if (key.name === "return") {
|
|
321
|
+
cleanup();
|
|
322
|
+
resolve({ action: "select", index, value: items[index].value });
|
|
323
|
+
} else if (key.name === "backspace" || key.name === "escape" || key.name === "delete") {
|
|
324
|
+
cleanup();
|
|
325
|
+
resolve({ action: "back" });
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function cleanup() {
|
|
330
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
331
|
+
if (process.stdin.isTTY) {
|
|
332
|
+
process.stdin.setRawMode(false);
|
|
333
|
+
}
|
|
334
|
+
process.stdin.pause();
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
process.stdin.on("keypress", onKeypress);
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export function adjustAlphaMenu(initialAlpha) {
|
|
342
|
+
return new Promise((resolve) => {
|
|
343
|
+
let alpha = initialAlpha;
|
|
344
|
+
|
|
345
|
+
if (process.stdin.isTTY) {
|
|
346
|
+
process.stdin.setRawMode(true);
|
|
347
|
+
}
|
|
348
|
+
process.stdin.resume();
|
|
349
|
+
|
|
350
|
+
function render() {
|
|
351
|
+
console.clear();
|
|
352
|
+
console.log(`\n RSF ALPHA WEIGHT BALANCER`);
|
|
353
|
+
console.log(` \x1b[90mAdjust Vector Similarity vs BM25 Score Weight\x1b[0m`);
|
|
354
|
+
console.log("\n Controls: ← / → or ↑ / ↓ - Adjust (5% step) [ENTER] - Save [BACKSPACE] - Cancel\n");
|
|
355
|
+
|
|
356
|
+
const semPct = Math.round(alpha * 100);
|
|
357
|
+
const lexPct = 100 - semPct;
|
|
358
|
+
|
|
359
|
+
const totalBlocks = 20;
|
|
360
|
+
const semBlocks = Math.round(alpha * totalBlocks);
|
|
361
|
+
const lexBlocks = totalBlocks - semBlocks;
|
|
362
|
+
|
|
363
|
+
const bar = "━".repeat(semBlocks) + "─".repeat(lexBlocks);
|
|
364
|
+
|
|
365
|
+
console.log(` Balance: \x1b[36m${semPct}% Semantic (Vector)\x1b[0m / \x1b[33m${lexPct}% Lexical (BM25)\x1b[0m`);
|
|
366
|
+
console.log(` [ \x1b[36m${bar}\x1b[0m ] Alpha: \x1b[1m\x1b[32m${alpha.toFixed(2)}\x1b[0m\n`);
|
|
367
|
+
|
|
368
|
+
if (alpha === 0.5) {
|
|
369
|
+
console.log(" [*] \x1b[32mMode: 50 / 50 Balanced Hybrid Fusion (Recommended)\x1b[0m\n");
|
|
370
|
+
} else if (alpha > 0.5) {
|
|
371
|
+
console.log(` [*] Mode: Semantic Vector Priority (${semPct}%)\n`);
|
|
372
|
+
} else {
|
|
373
|
+
console.log(` [*] Mode: Exact Keyword BM25 Priority (${lexPct}%)\n`);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
printQuickInfoBox(`RSF Formula: Score = ${alpha.toFixed(2)} * NormVector + ${(1 - alpha).toFixed(2)} * NormBM25`);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
render();
|
|
380
|
+
|
|
381
|
+
function onKeypress(str, key) {
|
|
382
|
+
if (!key) return;
|
|
383
|
+
if (key.ctrl && key.name === "c") {
|
|
384
|
+
cleanup();
|
|
385
|
+
process.exit(0);
|
|
386
|
+
}
|
|
387
|
+
if (key.name === "left" || key.name === "down") {
|
|
388
|
+
alpha = Math.max(0.0, Math.round((alpha - 0.05) * 100) / 100);
|
|
389
|
+
render();
|
|
390
|
+
} else if (key.name === "right" || key.name === "up") {
|
|
391
|
+
alpha = Math.min(1.0, Math.round((alpha + 0.05) * 100) / 100);
|
|
392
|
+
render();
|
|
393
|
+
} else if (key.name === "return") {
|
|
394
|
+
cleanup();
|
|
395
|
+
resolve({ action: "save", value: alpha });
|
|
396
|
+
} else if (key.name === "backspace" || key.name === "escape" || key.name === "delete") {
|
|
397
|
+
cleanup();
|
|
398
|
+
resolve({ action: "cancel" });
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
function cleanup() {
|
|
403
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
404
|
+
if (process.stdin.isTTY) {
|
|
405
|
+
process.stdin.setRawMode(false);
|
|
406
|
+
}
|
|
407
|
+
process.stdin.pause();
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
process.stdin.on("keypress", onKeypress);
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
export function readTextInput(promptText, defaultValue = "") {
|
|
415
|
+
return new Promise((resolve) => {
|
|
416
|
+
let text = defaultValue;
|
|
417
|
+
|
|
418
|
+
if (process.stdin.isTTY) {
|
|
419
|
+
process.stdin.setRawMode(true);
|
|
420
|
+
}
|
|
421
|
+
process.stdin.resume();
|
|
422
|
+
|
|
423
|
+
function render() {
|
|
424
|
+
console.clear();
|
|
425
|
+
console.log(`\n INPUT: ${promptText.toUpperCase()}`);
|
|
426
|
+
console.log(" Controls: Type text [ENTER] - Submit [BACKSPACE] - Delete / Cancel\n");
|
|
427
|
+
console.log(` > \x1b[36m${text}\x1b[0m_\n`);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
render();
|
|
431
|
+
|
|
432
|
+
function onKeypress(str, key) {
|
|
433
|
+
if (!key) return;
|
|
434
|
+
if (key.ctrl && key.name === "c") {
|
|
435
|
+
cleanup();
|
|
436
|
+
process.exit(0);
|
|
437
|
+
}
|
|
438
|
+
if (key.name === "return") {
|
|
439
|
+
cleanup();
|
|
440
|
+
resolve({ action: "submit", value: text.trim() });
|
|
441
|
+
} else if (key.name === "backspace" || key.name === "delete") {
|
|
442
|
+
if (text.length > 0) {
|
|
443
|
+
text = text.slice(0, -1);
|
|
444
|
+
render();
|
|
445
|
+
} else {
|
|
446
|
+
cleanup();
|
|
447
|
+
resolve({ action: "cancel" });
|
|
448
|
+
}
|
|
449
|
+
} else if (key.name === "escape") {
|
|
450
|
+
cleanup();
|
|
451
|
+
resolve({ action: "cancel" });
|
|
452
|
+
} else if (str && str.length === 1 && str.charCodeAt(0) >= 32) {
|
|
453
|
+
text += str;
|
|
454
|
+
render();
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
function cleanup() {
|
|
459
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
460
|
+
if (process.stdin.isTTY) {
|
|
461
|
+
process.stdin.setRawMode(false);
|
|
462
|
+
}
|
|
463
|
+
process.stdin.pause();
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
process.stdin.on("keypress", onKeypress);
|
|
467
|
+
});
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
export function waitForEnter() {
|
|
471
|
+
return new Promise((resolve) => {
|
|
472
|
+
console.log("\n \x1b[90mPress [ENTER] or [BACKSPACE] to return to menu...\x1b[0m");
|
|
473
|
+
if (process.stdin.isTTY) {
|
|
474
|
+
process.stdin.setRawMode(true);
|
|
475
|
+
}
|
|
476
|
+
process.stdin.resume();
|
|
477
|
+
|
|
478
|
+
function onKeypress(str, key) {
|
|
479
|
+
if (!key) return;
|
|
480
|
+
if (key.ctrl && key.name === "c") {
|
|
481
|
+
cleanup();
|
|
482
|
+
process.exit(0);
|
|
483
|
+
}
|
|
484
|
+
if (key.name === "return" || key.name === "backspace" || key.name === "escape" || key.name === "delete" || key.name === "space") {
|
|
485
|
+
cleanup();
|
|
486
|
+
resolve();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function cleanup() {
|
|
491
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
492
|
+
if (process.stdin.isTTY) {
|
|
493
|
+
process.stdin.setRawMode(false);
|
|
494
|
+
}
|
|
495
|
+
process.stdin.pause();
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
process.stdin.on("keypress", onKeypress);
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export function promptText(question) {
|
|
503
|
+
return new Promise((resolve) => {
|
|
504
|
+
let input = "";
|
|
505
|
+
let cursorPos = 0;
|
|
506
|
+
|
|
507
|
+
console.log(`\n ${question}\n > `);
|
|
508
|
+
|
|
509
|
+
if (process.stdin.isTTY) {
|
|
510
|
+
process.stdin.setRawMode(true);
|
|
511
|
+
}
|
|
512
|
+
process.stdin.resume();
|
|
513
|
+
|
|
514
|
+
function render() {
|
|
515
|
+
process.stdout.write(`\r > ${input}\x1b[K`);
|
|
516
|
+
process.stdout.write(`\r > ${input.substring(0, cursorPos)}`);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
function onKeypress(str, key) {
|
|
520
|
+
if (!key) return;
|
|
521
|
+
if (key.ctrl && key.name === "c") {
|
|
522
|
+
cleanup();
|
|
523
|
+
process.exit(0);
|
|
524
|
+
}
|
|
525
|
+
if (key.name === "return") {
|
|
526
|
+
cleanup();
|
|
527
|
+
resolve(input.trim());
|
|
528
|
+
} else if (key.name === "backspace") {
|
|
529
|
+
if (cursorPos > 0) {
|
|
530
|
+
input = input.substring(0, cursorPos - 1) + input.substring(cursorPos);
|
|
531
|
+
cursorPos--;
|
|
532
|
+
render();
|
|
533
|
+
}
|
|
534
|
+
} else if (key.name === "delete") {
|
|
535
|
+
if (cursorPos < input.length) {
|
|
536
|
+
input = input.substring(0, cursorPos) + input.substring(cursorPos + 1);
|
|
537
|
+
render();
|
|
538
|
+
}
|
|
539
|
+
} else if (key.name === "left") {
|
|
540
|
+
if (cursorPos > 0) { cursorPos--; render(); }
|
|
541
|
+
} else if (key.name === "right") {
|
|
542
|
+
if (cursorPos < input.length) { cursorPos++; render(); }
|
|
543
|
+
} else if (key.name === "home") {
|
|
544
|
+
cursorPos = 0; render();
|
|
545
|
+
} else if (key.name === "end") {
|
|
546
|
+
cursorPos = input.length; render();
|
|
547
|
+
} else if (str && !key.ctrl && !key.meta) {
|
|
548
|
+
input = input.substring(0, cursorPos) + str + input.substring(cursorPos);
|
|
549
|
+
cursorPos += str.length;
|
|
550
|
+
render();
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
function cleanup() {
|
|
555
|
+
process.stdin.removeListener("keypress", onKeypress);
|
|
556
|
+
if (process.stdin.isTTY) {
|
|
557
|
+
process.stdin.setRawMode(false);
|
|
558
|
+
}
|
|
559
|
+
process.stdin.pause();
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
process.stdin.on("keypress", onKeypress);
|
|
563
|
+
});
|
|
564
|
+
}
|