openclaw-cortex-memory 0.1.0-Alpha.2 → 0.1.0-Alpha.21
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/README.md +163 -203
- package/SKILL.md +71 -268
- package/dist/index.d.ts +88 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +859 -1189
- package/dist/index.js.map +1 -1
- package/dist/openclaw.plugin.json +362 -14
- package/dist/src/dedup/three_stage_deduplicator.d.ts +25 -0
- package/dist/src/dedup/three_stage_deduplicator.d.ts.map +1 -0
- package/dist/src/dedup/three_stage_deduplicator.js +224 -0
- package/dist/src/dedup/three_stage_deduplicator.js.map +1 -0
- package/dist/src/engine/memory_engine.d.ts +2 -1
- package/dist/src/engine/memory_engine.d.ts.map +1 -1
- package/dist/src/engine/ts_engine.d.ts +126 -0
- package/dist/src/engine/ts_engine.d.ts.map +1 -1
- package/dist/src/engine/ts_engine.js +1172 -44
- package/dist/src/engine/ts_engine.js.map +1 -1
- package/dist/src/engine/types.d.ts +12 -0
- package/dist/src/engine/types.d.ts.map +1 -1
- package/dist/src/graph/ontology.d.ts +103 -0
- package/dist/src/graph/ontology.d.ts.map +1 -0
- package/dist/src/graph/ontology.js +564 -0
- package/dist/src/graph/ontology.js.map +1 -0
- package/dist/src/quality/llm_output_validator.d.ts +48 -0
- package/dist/src/quality/llm_output_validator.d.ts.map +1 -0
- package/dist/src/quality/llm_output_validator.js +404 -0
- package/dist/src/quality/llm_output_validator.js.map +1 -0
- package/dist/src/reflect/reflector.d.ts +7 -0
- package/dist/src/reflect/reflector.d.ts.map +1 -1
- package/dist/src/reflect/reflector.js +358 -8
- package/dist/src/reflect/reflector.js.map +1 -1
- package/dist/src/rules/rule_store.d.ts.map +1 -1
- package/dist/src/rules/rule_store.js +75 -16
- package/dist/src/rules/rule_store.js.map +1 -1
- package/dist/src/session/session_end.d.ts +33 -0
- package/dist/src/session/session_end.d.ts.map +1 -1
- package/dist/src/session/session_end.js +67 -64
- package/dist/src/session/session_end.js.map +1 -1
- package/dist/src/store/archive_store.d.ts +128 -0
- package/dist/src/store/archive_store.d.ts.map +1 -0
- package/dist/src/store/archive_store.js +481 -0
- package/dist/src/store/archive_store.js.map +1 -0
- package/dist/src/store/embedding_utils.d.ts +32 -0
- package/dist/src/store/embedding_utils.d.ts.map +1 -0
- package/dist/src/store/embedding_utils.js +173 -0
- package/dist/src/store/embedding_utils.js.map +1 -0
- package/dist/src/store/graph_memory_store.d.ts +44 -0
- package/dist/src/store/graph_memory_store.d.ts.map +1 -0
- package/dist/src/store/graph_memory_store.js +168 -0
- package/dist/src/store/graph_memory_store.js.map +1 -0
- package/dist/src/store/read_store.d.ts +86 -0
- package/dist/src/store/read_store.d.ts.map +1 -1
- package/dist/src/store/read_store.js +1681 -25
- package/dist/src/store/read_store.js.map +1 -1
- package/dist/src/store/vector_store.d.ts +44 -0
- package/dist/src/store/vector_store.d.ts.map +1 -0
- package/dist/src/store/vector_store.js +201 -0
- package/dist/src/store/vector_store.js.map +1 -0
- package/dist/src/store/write_store.d.ts +52 -0
- package/dist/src/store/write_store.d.ts.map +1 -1
- package/dist/src/store/write_store.js +245 -3
- package/dist/src/store/write_store.js.map +1 -1
- package/dist/src/sync/session_sync.d.ts +100 -2
- package/dist/src/sync/session_sync.d.ts.map +1 -1
- package/dist/src/sync/session_sync.js +673 -22
- package/dist/src/sync/session_sync.js.map +1 -1
- package/dist/src/utils/runtime_env.d.ts +4 -0
- package/dist/src/utils/runtime_env.d.ts.map +1 -0
- package/dist/src/utils/runtime_env.js +51 -0
- package/dist/src/utils/runtime_env.js.map +1 -0
- package/openclaw.plugin.json +362 -14
- package/package.json +23 -6
- package/scripts/cli.js +19 -14
- package/scripts/uninstall.js +22 -5
- package/index.ts +0 -2092
- package/scripts/install.js +0 -27
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "openclaw-cortex-memory",
|
|
3
3
|
"name": "Cortex Memory",
|
|
4
|
-
"version": "0.1.0-Alpha.
|
|
4
|
+
"version": "0.1.0-Alpha.21",
|
|
5
5
|
"description": "Long-term memory system with semantic, episodic, and procedural memory for AI Agents",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
-
"author": "
|
|
7
|
+
"author": "deki18",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"type": "memory",
|
|
10
10
|
"repository": {
|
|
@@ -56,6 +56,32 @@
|
|
|
56
56
|
"type": "array",
|
|
57
57
|
"description": "Involved entities",
|
|
58
58
|
"items": {
|
|
59
|
+
"oneOf": [
|
|
60
|
+
{
|
|
61
|
+
"type": "string"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"type": "object",
|
|
65
|
+
"properties": {
|
|
66
|
+
"id": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"name": {
|
|
70
|
+
"type": "string"
|
|
71
|
+
},
|
|
72
|
+
"type": {
|
|
73
|
+
"type": "string"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"additionalProperties": false
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"entity_types": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "Entity type map, key is entity name and value is type",
|
|
84
|
+
"additionalProperties": {
|
|
59
85
|
"type": "string"
|
|
60
86
|
}
|
|
61
87
|
},
|
|
@@ -67,7 +93,33 @@
|
|
|
67
93
|
"type": "array",
|
|
68
94
|
"description": "Entity relationships",
|
|
69
95
|
"items": {
|
|
70
|
-
"
|
|
96
|
+
"oneOf": [
|
|
97
|
+
{
|
|
98
|
+
"type": "string"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"type": "object",
|
|
102
|
+
"properties": {
|
|
103
|
+
"source": {
|
|
104
|
+
"type": "string"
|
|
105
|
+
},
|
|
106
|
+
"target": {
|
|
107
|
+
"type": "string"
|
|
108
|
+
},
|
|
109
|
+
"type": {
|
|
110
|
+
"type": "string"
|
|
111
|
+
},
|
|
112
|
+
"evidence_span": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"confidence": {
|
|
116
|
+
"type": "number"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"required": ["source", "target"],
|
|
120
|
+
"additionalProperties": false
|
|
121
|
+
}
|
|
122
|
+
]
|
|
71
123
|
}
|
|
72
124
|
}
|
|
73
125
|
},
|
|
@@ -84,6 +136,23 @@
|
|
|
84
136
|
"entity": {
|
|
85
137
|
"type": "string",
|
|
86
138
|
"description": "Entity name"
|
|
139
|
+
},
|
|
140
|
+
"rel": {
|
|
141
|
+
"type": "string",
|
|
142
|
+
"description": "Optional relation type filter"
|
|
143
|
+
},
|
|
144
|
+
"dir": {
|
|
145
|
+
"type": "string",
|
|
146
|
+
"description": "Relation direction filter",
|
|
147
|
+
"enum": ["incoming", "outgoing", "both"]
|
|
148
|
+
},
|
|
149
|
+
"path_to": {
|
|
150
|
+
"type": "string",
|
|
151
|
+
"description": "Find path from entity to this target entity"
|
|
152
|
+
},
|
|
153
|
+
"max_depth": {
|
|
154
|
+
"type": "integer",
|
|
155
|
+
"description": "Path query max depth (2~4)"
|
|
87
156
|
}
|
|
88
157
|
},
|
|
89
158
|
"required": ["entity"],
|
|
@@ -140,6 +209,39 @@
|
|
|
140
209
|
"additionalProperties": false
|
|
141
210
|
}
|
|
142
211
|
},
|
|
212
|
+
{
|
|
213
|
+
"name": "backfill_embeddings",
|
|
214
|
+
"description": "Backfill missing embeddings for active/archive records",
|
|
215
|
+
"parameters": {
|
|
216
|
+
"type": "object",
|
|
217
|
+
"properties": {
|
|
218
|
+
"layer": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"enum": ["active", "archive", "all"],
|
|
221
|
+
"description": "Target layer to backfill"
|
|
222
|
+
},
|
|
223
|
+
"batch_size": {
|
|
224
|
+
"type": "integer",
|
|
225
|
+
"description": "Batch size per processing window"
|
|
226
|
+
},
|
|
227
|
+
"max_retries": {
|
|
228
|
+
"type": "integer",
|
|
229
|
+
"description": "Max retry count for failed records"
|
|
230
|
+
},
|
|
231
|
+
"retry_failed_only": {
|
|
232
|
+
"type": "boolean",
|
|
233
|
+
"description": "Only retry failed records"
|
|
234
|
+
},
|
|
235
|
+
"rebuild_mode": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"enum": ["incremental", "vector_only", "full"],
|
|
238
|
+
"description": "Rebuild mode"
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
"required": [],
|
|
242
|
+
"additionalProperties": false
|
|
243
|
+
}
|
|
244
|
+
},
|
|
143
245
|
{
|
|
144
246
|
"name": "delete_memory",
|
|
145
247
|
"description": "Delete a memory by ID",
|
|
@@ -174,17 +276,6 @@
|
|
|
174
276
|
"description": "Enable or disable Cortex Memory plugin",
|
|
175
277
|
"default": true
|
|
176
278
|
},
|
|
177
|
-
"apiUrl": {
|
|
178
|
-
"type": "string",
|
|
179
|
-
"description": "URL of the memory service API",
|
|
180
|
-
"default": "http://127.0.0.1:8765"
|
|
181
|
-
},
|
|
182
|
-
"engineMode": {
|
|
183
|
-
"type": "string",
|
|
184
|
-
"description": "Memory engine mode",
|
|
185
|
-
"enum": ["ts"],
|
|
186
|
-
"default": "ts"
|
|
187
|
-
},
|
|
188
279
|
"dbPath": {
|
|
189
280
|
"type": "string",
|
|
190
281
|
"description": "Path to the memory database directory"
|
|
@@ -199,6 +290,17 @@
|
|
|
199
290
|
"description": "Automatically trigger reflection periodically",
|
|
200
291
|
"default": false
|
|
201
292
|
},
|
|
293
|
+
"autoReflectIntervalMinutes": {
|
|
294
|
+
"type": "integer",
|
|
295
|
+
"description": "Auto reflection scan interval in minutes",
|
|
296
|
+
"default": 30
|
|
297
|
+
},
|
|
298
|
+
"graphQualityMode": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "Graph extraction quality gate mode",
|
|
301
|
+
"enum": ["off", "warn", "strict"],
|
|
302
|
+
"default": "warn"
|
|
303
|
+
},
|
|
202
304
|
"embedding": {
|
|
203
305
|
"type": "object",
|
|
204
306
|
"description": "Embedding model configuration",
|
|
@@ -226,8 +328,19 @@
|
|
|
226
328
|
"dimensions": {
|
|
227
329
|
"type": "integer",
|
|
228
330
|
"description": "Embedding dimensions"
|
|
331
|
+
},
|
|
332
|
+
"timeoutMs": {
|
|
333
|
+
"type": "integer",
|
|
334
|
+
"description": "Embedding request timeout in milliseconds",
|
|
335
|
+
"default": 20000
|
|
336
|
+
},
|
|
337
|
+
"maxRetries": {
|
|
338
|
+
"type": "integer",
|
|
339
|
+
"description": "Maximum retry attempts for embedding requests",
|
|
340
|
+
"default": 4
|
|
229
341
|
}
|
|
230
342
|
},
|
|
343
|
+
"required": ["provider", "model", "apiKey", "baseURL"],
|
|
231
344
|
"additionalProperties": false
|
|
232
345
|
},
|
|
233
346
|
"llm": {
|
|
@@ -255,6 +368,7 @@
|
|
|
255
368
|
"description": "LLM API base URL (camelCase alias)"
|
|
256
369
|
}
|
|
257
370
|
},
|
|
371
|
+
"required": ["provider", "model", "apiKey", "baseURL"],
|
|
258
372
|
"additionalProperties": false
|
|
259
373
|
},
|
|
260
374
|
"reranker": {
|
|
@@ -282,12 +396,246 @@
|
|
|
282
396
|
"description": "Reranker API base URL (camelCase alias)"
|
|
283
397
|
}
|
|
284
398
|
},
|
|
399
|
+
"required": ["provider", "model", "apiKey", "baseURL"],
|
|
285
400
|
"additionalProperties": false
|
|
286
401
|
},
|
|
287
402
|
"fallbackToBuiltin": {
|
|
288
403
|
"type": "boolean",
|
|
289
404
|
"description": "Fallback to OpenClaw builtin memory when Cortex Memory fails",
|
|
290
405
|
"default": true
|
|
406
|
+
},
|
|
407
|
+
"readFusion": {
|
|
408
|
+
"type": "object",
|
|
409
|
+
"description": "Post-rerank LLM fusion for multi-route retrieval results",
|
|
410
|
+
"properties": {
|
|
411
|
+
"enabled": {
|
|
412
|
+
"type": "boolean",
|
|
413
|
+
"description": "Enable LLM fusion after rerank",
|
|
414
|
+
"default": true
|
|
415
|
+
},
|
|
416
|
+
"maxCandidates": {
|
|
417
|
+
"type": "integer",
|
|
418
|
+
"description": "Maximum reranked candidates used for fusion",
|
|
419
|
+
"default": 10
|
|
420
|
+
},
|
|
421
|
+
"authoritative": {
|
|
422
|
+
"type": "boolean",
|
|
423
|
+
"description": "Return only fused authoritative memory package to agent",
|
|
424
|
+
"default": true
|
|
425
|
+
},
|
|
426
|
+
"channelWeights": {
|
|
427
|
+
"type": "object",
|
|
428
|
+
"description": "Channel score multiplier overrides",
|
|
429
|
+
"properties": {
|
|
430
|
+
"rules": { "type": "number" },
|
|
431
|
+
"archive": { "type": "number" },
|
|
432
|
+
"vector": { "type": "number" },
|
|
433
|
+
"graph": { "type": "number" }
|
|
434
|
+
},
|
|
435
|
+
"additionalProperties": false
|
|
436
|
+
},
|
|
437
|
+
"channelTopK": {
|
|
438
|
+
"type": "object",
|
|
439
|
+
"description": "Per-channel pre-merge candidate quotas",
|
|
440
|
+
"properties": {
|
|
441
|
+
"rules": { "type": "integer" },
|
|
442
|
+
"archive": { "type": "integer" },
|
|
443
|
+
"vector": { "type": "integer" },
|
|
444
|
+
"graph": { "type": "integer" }
|
|
445
|
+
},
|
|
446
|
+
"additionalProperties": false
|
|
447
|
+
},
|
|
448
|
+
"minLexicalHits": {
|
|
449
|
+
"type": "integer",
|
|
450
|
+
"description": "Ensure lexical-hit coverage in final ranked set"
|
|
451
|
+
},
|
|
452
|
+
"minSemanticHits": {
|
|
453
|
+
"type": "integer",
|
|
454
|
+
"description": "Ensure semantic-hit coverage in final ranked set"
|
|
455
|
+
},
|
|
456
|
+
"lengthNorm": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"description": "Length normalization settings for semantic score",
|
|
459
|
+
"properties": {
|
|
460
|
+
"enabled": { "type": "boolean", "default": true },
|
|
461
|
+
"pivotChars": { "type": "integer", "default": 1200 },
|
|
462
|
+
"strength": { "type": "number", "default": 0.75 },
|
|
463
|
+
"minFactor": { "type": "number", "default": 0.45 }
|
|
464
|
+
},
|
|
465
|
+
"additionalProperties": false
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
"additionalProperties": false
|
|
469
|
+
},
|
|
470
|
+
"vectorChunking": {
|
|
471
|
+
"type": "object",
|
|
472
|
+
"description": "Vector chunking controls for active/archive full-text chunk embeddings",
|
|
473
|
+
"properties": {
|
|
474
|
+
"chunkSize": {
|
|
475
|
+
"type": "integer",
|
|
476
|
+
"description": "Chunk size in characters",
|
|
477
|
+
"default": 600
|
|
478
|
+
},
|
|
479
|
+
"chunkOverlap": {
|
|
480
|
+
"type": "integer",
|
|
481
|
+
"description": "Chunk overlap in characters",
|
|
482
|
+
"default": 100
|
|
483
|
+
},
|
|
484
|
+
"evidenceMaxChunks": {
|
|
485
|
+
"type": "integer",
|
|
486
|
+
"description": "Maximum evidence chunks per archive event",
|
|
487
|
+
"default": 2
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
"additionalProperties": false
|
|
491
|
+
},
|
|
492
|
+
"writePolicy": {
|
|
493
|
+
"type": "object",
|
|
494
|
+
"description": "Write-path quality thresholds and limits",
|
|
495
|
+
"properties": {
|
|
496
|
+
"archiveMinConfidence": {
|
|
497
|
+
"type": "number",
|
|
498
|
+
"description": "Minimum confidence for archiving events",
|
|
499
|
+
"default": 0.35
|
|
500
|
+
},
|
|
501
|
+
"archiveMinQualityScore": {
|
|
502
|
+
"type": "number",
|
|
503
|
+
"description": "Minimum quality score for archive events",
|
|
504
|
+
"default": 0.4
|
|
505
|
+
},
|
|
506
|
+
"activeMinQualityScore": {
|
|
507
|
+
"type": "number",
|
|
508
|
+
"description": "Minimum quality score for active records",
|
|
509
|
+
"default": 0.45
|
|
510
|
+
},
|
|
511
|
+
"activeDedupTailLines": {
|
|
512
|
+
"type": "integer",
|
|
513
|
+
"description": "Active-layer dedup tail line window",
|
|
514
|
+
"default": 200
|
|
515
|
+
},
|
|
516
|
+
"activeTextMaxChars": {
|
|
517
|
+
"type": "integer",
|
|
518
|
+
"description": "Maximum chars for active text payload",
|
|
519
|
+
"default": 4000
|
|
520
|
+
},
|
|
521
|
+
"archiveSourceTextMaxChars": {
|
|
522
|
+
"type": "integer",
|
|
523
|
+
"description": "Maximum chars for archive source_text payload",
|
|
524
|
+
"default": 8000
|
|
525
|
+
}
|
|
526
|
+
},
|
|
527
|
+
"additionalProperties": false
|
|
528
|
+
},
|
|
529
|
+
"memoryDecay": {
|
|
530
|
+
"type": "object",
|
|
531
|
+
"description": "Time-decay controls for retrieval ranking by event_type",
|
|
532
|
+
"properties": {
|
|
533
|
+
"enabled": {
|
|
534
|
+
"type": "boolean",
|
|
535
|
+
"description": "Enable event-type half-life decay in retrieval ranking",
|
|
536
|
+
"default": true
|
|
537
|
+
},
|
|
538
|
+
"minFloor": {
|
|
539
|
+
"type": "number",
|
|
540
|
+
"description": "Minimum decay factor floor in [0,1]",
|
|
541
|
+
"default": 0.15
|
|
542
|
+
},
|
|
543
|
+
"defaultHalfLifeDays": {
|
|
544
|
+
"type": "number",
|
|
545
|
+
"description": "Default half-life in days for unconfigured event types",
|
|
546
|
+
"default": 90
|
|
547
|
+
},
|
|
548
|
+
"halfLifeByEventType": {
|
|
549
|
+
"type": "object",
|
|
550
|
+
"description": "Half-life days overrides by event_type",
|
|
551
|
+
"additionalProperties": {
|
|
552
|
+
"type": "number"
|
|
553
|
+
}
|
|
554
|
+
},
|
|
555
|
+
"antiDecay": {
|
|
556
|
+
"type": "object",
|
|
557
|
+
"description": "Hit-frequency anti-decay controls",
|
|
558
|
+
"properties": {
|
|
559
|
+
"enabled": {
|
|
560
|
+
"type": "boolean",
|
|
561
|
+
"description": "Enable anti-decay boost for frequently hit memories",
|
|
562
|
+
"default": true
|
|
563
|
+
},
|
|
564
|
+
"maxBoost": {
|
|
565
|
+
"type": "number",
|
|
566
|
+
"description": "Maximum multiplicative anti-decay boost (>=1)",
|
|
567
|
+
"default": 1.6
|
|
568
|
+
},
|
|
569
|
+
"hitWeight": {
|
|
570
|
+
"type": "number",
|
|
571
|
+
"description": "Hit count to boost conversion weight",
|
|
572
|
+
"default": 0.08
|
|
573
|
+
},
|
|
574
|
+
"recentWindowDays": {
|
|
575
|
+
"type": "number",
|
|
576
|
+
"description": "Recent hit window in days for freshness contribution",
|
|
577
|
+
"default": 30
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"additionalProperties": false
|
|
581
|
+
}
|
|
582
|
+
},
|
|
583
|
+
"additionalProperties": false
|
|
584
|
+
},
|
|
585
|
+
"readTuning": {
|
|
586
|
+
"type": "object",
|
|
587
|
+
"description": "Read-path ranking and recency tuning",
|
|
588
|
+
"properties": {
|
|
589
|
+
"scoring": {
|
|
590
|
+
"type": "object",
|
|
591
|
+
"properties": {
|
|
592
|
+
"lexicalWeight": { "type": "number", "default": 0.2 },
|
|
593
|
+
"bm25Scale": { "type": "number", "default": 2 },
|
|
594
|
+
"semanticWeight": { "type": "number", "default": 0.3 },
|
|
595
|
+
"recencyWeight": { "type": "number", "default": 0.1 },
|
|
596
|
+
"qualityWeight": { "type": "number", "default": 0.15 },
|
|
597
|
+
"typeMatchWeight": { "type": "number", "default": 0.15 },
|
|
598
|
+
"graphMatchWeight": { "type": "number", "default": 0.1 }
|
|
599
|
+
},
|
|
600
|
+
"additionalProperties": false
|
|
601
|
+
},
|
|
602
|
+
"rrf": {
|
|
603
|
+
"type": "object",
|
|
604
|
+
"properties": {
|
|
605
|
+
"k": { "type": "integer", "default": 60 },
|
|
606
|
+
"weight": { "type": "number", "default": 1.5 }
|
|
607
|
+
},
|
|
608
|
+
"additionalProperties": false
|
|
609
|
+
},
|
|
610
|
+
"recency": {
|
|
611
|
+
"type": "object",
|
|
612
|
+
"properties": {
|
|
613
|
+
"buckets": {
|
|
614
|
+
"type": "array",
|
|
615
|
+
"items": {
|
|
616
|
+
"type": "object",
|
|
617
|
+
"properties": {
|
|
618
|
+
"maxAgeHours": { "type": "number" },
|
|
619
|
+
"score": { "type": "number" },
|
|
620
|
+
"bonus": { "type": "number" }
|
|
621
|
+
},
|
|
622
|
+
"required": ["maxAgeHours", "score", "bonus"],
|
|
623
|
+
"additionalProperties": false
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"additionalProperties": false
|
|
628
|
+
},
|
|
629
|
+
"autoContext": {
|
|
630
|
+
"type": "object",
|
|
631
|
+
"properties": {
|
|
632
|
+
"queryMaxChars": { "type": "integer", "default": 80 },
|
|
633
|
+
"lightweightSearch": { "type": "boolean", "default": true }
|
|
634
|
+
},
|
|
635
|
+
"additionalProperties": false
|
|
636
|
+
}
|
|
637
|
+
},
|
|
638
|
+
"additionalProperties": false
|
|
291
639
|
}
|
|
292
640
|
},
|
|
293
641
|
"additionalProperties": false
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface LoggerLike {
|
|
2
|
+
debug: (message: string, ...args: unknown[]) => void;
|
|
3
|
+
info: (message: string, ...args: unknown[]) => void;
|
|
4
|
+
warn: (message: string, ...args: unknown[]) => void;
|
|
5
|
+
}
|
|
6
|
+
interface DedupInput {
|
|
7
|
+
id: string;
|
|
8
|
+
summary: string;
|
|
9
|
+
embedding?: number[];
|
|
10
|
+
}
|
|
11
|
+
interface DedupResult {
|
|
12
|
+
duplicate: boolean;
|
|
13
|
+
stage?: "simhash" | "minhash" | "vector";
|
|
14
|
+
matchedId?: string;
|
|
15
|
+
}
|
|
16
|
+
interface DeduplicatorOptions {
|
|
17
|
+
memoryRoot: string;
|
|
18
|
+
logger: LoggerLike;
|
|
19
|
+
}
|
|
20
|
+
export declare function createThreeStageDeduplicator(options: DeduplicatorOptions): {
|
|
21
|
+
check(input: DedupInput): DedupResult;
|
|
22
|
+
append(input: DedupInput): void;
|
|
23
|
+
};
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=three_stage_deduplicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"three_stage_deduplicator.d.ts","sourceRoot":"","sources":["../../../src/dedup/three_stage_deduplicator.ts"],"names":[],"mappings":"AAIA,UAAU,UAAU;IAClB,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACrD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACpD,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;CACrD;AAeD,UAAU,UAAU;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,UAAU,WAAW;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;CACpB;AAgJD,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,mBAAmB,GAAG;IAC1E,KAAK,CAAC,KAAK,EAAE,UAAU,GAAG,WAAW,CAAC;IACtC,MAAM,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;CACjC,CAsDA"}
|