@tonycasey/lisa 2.12.0 → 2.25.2
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 +2 -2
- package/dist/lib/application/handlers/PromptSubmitHandler.js +2 -2
- package/dist/lib/application/handlers/PromptSubmitHandler.js.map +1 -1
- package/dist/lib/application/handlers/SessionStopHandler.d.ts.map +1 -1
- package/dist/lib/application/handlers/SessionStopHandler.js +12 -2
- package/dist/lib/application/handlers/SessionStopHandler.js.map +1 -1
- package/dist/lib/commands/init.js +3 -3
- package/dist/lib/commands/init.js.map +1 -1
- package/dist/lib/commands/knowledge.d.ts.map +1 -1
- package/dist/lib/commands/knowledge.js +449 -1
- package/dist/lib/commands/knowledge.js.map +1 -1
- package/dist/lib/domain/errors/LlmErrors.d.ts +41 -0
- package/dist/lib/domain/errors/LlmErrors.d.ts.map +1 -0
- package/dist/lib/domain/errors/LlmErrors.js +64 -0
- package/dist/lib/domain/errors/LlmErrors.js.map +1 -0
- package/dist/lib/domain/interfaces/IConsolidationService.d.ts +65 -0
- package/dist/lib/domain/interfaces/IConsolidationService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IConsolidationService.js +21 -0
- package/dist/lib/domain/interfaces/IConsolidationService.js.map +1 -0
- package/dist/lib/domain/interfaces/ICurationService.d.ts +81 -0
- package/dist/lib/domain/interfaces/ICurationService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ICurationService.js +65 -0
- package/dist/lib/domain/interfaces/ICurationService.js.map +1 -0
- package/dist/lib/domain/interfaces/IDeduplicationService.d.ts +67 -0
- package/dist/lib/domain/interfaces/IDeduplicationService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IDeduplicationService.js +9 -0
- package/dist/lib/domain/interfaces/IDeduplicationService.js.map +1 -0
- package/dist/lib/domain/interfaces/ILlmConfigService.d.ts +36 -0
- package/dist/lib/domain/interfaces/ILlmConfigService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILlmConfigService.js +11 -0
- package/dist/lib/domain/interfaces/ILlmConfigService.js.map +1 -0
- package/dist/lib/domain/interfaces/ILlmGuard.d.ts +35 -0
- package/dist/lib/domain/interfaces/ILlmGuard.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILlmGuard.js +12 -0
- package/dist/lib/domain/interfaces/ILlmGuard.js.map +1 -0
- package/dist/lib/domain/interfaces/ILlmService.d.ts +87 -0
- package/dist/lib/domain/interfaces/ILlmService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILlmService.js +40 -0
- package/dist/lib/domain/interfaces/ILlmService.js.map +1 -0
- package/dist/lib/domain/interfaces/ILlmUsageTracker.d.ts +60 -0
- package/dist/lib/domain/interfaces/ILlmUsageTracker.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ILlmUsageTracker.js +29 -0
- package/dist/lib/domain/interfaces/ILlmUsageTracker.js.map +1 -0
- package/dist/lib/domain/interfaces/IMemoryService.d.ts +90 -0
- package/dist/lib/domain/interfaces/IMemoryService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/INlCurationService.d.ts +75 -0
- package/dist/lib/domain/interfaces/INlCurationService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/INlCurationService.js +31 -0
- package/dist/lib/domain/interfaces/INlCurationService.js.map +1 -0
- package/dist/lib/domain/interfaces/IPreferenceStore.d.ts +46 -0
- package/dist/lib/domain/interfaces/IPreferenceStore.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IPreferenceStore.js +11 -0
- package/dist/lib/domain/interfaces/IPreferenceStore.js.map +1 -0
- package/dist/lib/domain/interfaces/IRecursionService.d.ts +10 -6
- package/dist/lib/domain/interfaces/IRecursionService.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/ISummarizationService.d.ts +52 -0
- package/dist/lib/domain/interfaces/ISummarizationService.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ISummarizationService.js +11 -0
- package/dist/lib/domain/interfaces/ISummarizationService.js.map +1 -0
- package/dist/lib/domain/interfaces/ITaskTypeDetector.d.ts +34 -0
- package/dist/lib/domain/interfaces/ITaskTypeDetector.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ITaskTypeDetector.js +9 -0
- package/dist/lib/domain/interfaces/ITaskTypeDetector.js.map +1 -0
- package/dist/lib/domain/interfaces/ITranscriptEnricher.d.ts +68 -0
- package/dist/lib/domain/interfaces/ITranscriptEnricher.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/ITranscriptEnricher.js +32 -0
- package/dist/lib/domain/interfaces/ITranscriptEnricher.js.map +1 -0
- package/dist/lib/domain/interfaces/IWorkSummary.d.ts +64 -0
- package/dist/lib/domain/interfaces/IWorkSummary.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/IWorkSummary.js +13 -0
- package/dist/lib/domain/interfaces/IWorkSummary.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRelationshipRepository.d.ts +46 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRelationshipRepository.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRelationshipRepository.js +9 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRelationshipRepository.js.map +1 -0
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.d.ts +62 -1
- package/dist/lib/domain/interfaces/dal/IMemoryRepository.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/dal/index.d.ts +3 -2
- package/dist/lib/domain/interfaces/dal/index.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/dal/index.js.map +1 -1
- package/dist/lib/domain/interfaces/dal/types.d.ts +37 -0
- package/dist/lib/domain/interfaces/dal/types.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/dal/types.js.map +1 -1
- package/dist/lib/domain/interfaces/index.d.ts +15 -1
- package/dist/lib/domain/interfaces/index.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/index.js +21 -1
- package/dist/lib/domain/interfaces/index.js.map +1 -1
- package/dist/lib/domain/interfaces/types/ICapturedWork.d.ts +3 -0
- package/dist/lib/domain/interfaces/types/ICapturedWork.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/types/ICapturedWork.js.map +1 -1
- package/dist/lib/domain/interfaces/types/IMemoryLifecycle.d.ts +56 -0
- package/dist/lib/domain/interfaces/types/IMemoryLifecycle.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryLifecycle.js +94 -0
- package/dist/lib/domain/interfaces/types/IMemoryLifecycle.js.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryQuality.d.ts +113 -0
- package/dist/lib/domain/interfaces/types/IMemoryQuality.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryQuality.js +195 -0
- package/dist/lib/domain/interfaces/types/IMemoryQuality.js.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryRelationship.d.ts +49 -0
- package/dist/lib/domain/interfaces/types/IMemoryRelationship.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/IMemoryRelationship.js +62 -0
- package/dist/lib/domain/interfaces/types/IMemoryRelationship.js.map +1 -0
- package/dist/lib/domain/interfaces/types/ITaskType.d.ts +59 -0
- package/dist/lib/domain/interfaces/types/ITaskType.d.ts.map +1 -0
- package/dist/lib/domain/interfaces/types/ITaskType.js +104 -0
- package/dist/lib/domain/interfaces/types/ITaskType.js.map +1 -0
- package/dist/lib/domain/interfaces/types/index.d.ts +4 -0
- package/dist/lib/domain/interfaces/types/index.d.ts.map +1 -1
- package/dist/lib/domain/interfaces/types/index.js +33 -1
- package/dist/lib/domain/interfaces/types/index.js.map +1 -1
- package/dist/lib/domain/utils/deduplication.d.ts +38 -0
- package/dist/lib/domain/utils/deduplication.d.ts.map +1 -0
- package/dist/lib/domain/utils/deduplication.js +225 -0
- package/dist/lib/domain/utils/deduplication.js.map +1 -0
- package/dist/lib/domain/utils/index.d.ts +1 -0
- package/dist/lib/domain/utils/index.d.ts.map +1 -1
- package/dist/lib/domain/utils/index.js +6 -1
- package/dist/lib/domain/utils/index.js.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.d.ts +12 -2
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.d.ts.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.js +14 -0
- package/dist/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.js.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.d.ts +25 -3
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.d.ts.map +1 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.js +156 -1
- package/dist/lib/infrastructure/dal/repositories/neo4j/Neo4jMemoryRepository.js.map +1 -1
- package/dist/lib/infrastructure/di/bootstrap.d.ts.map +1 -1
- package/dist/lib/infrastructure/di/bootstrap.js +92 -2
- package/dist/lib/infrastructure/di/bootstrap.js.map +1 -1
- package/dist/lib/infrastructure/di/tokens.d.ts +24 -0
- package/dist/lib/infrastructure/di/tokens.d.ts.map +1 -1
- package/dist/lib/infrastructure/di/tokens.js +12 -0
- package/dist/lib/infrastructure/di/tokens.js.map +1 -1
- package/dist/lib/infrastructure/services/ConsolidationService.d.ts +21 -0
- package/dist/lib/infrastructure/services/ConsolidationService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/ConsolidationService.js +134 -0
- package/dist/lib/infrastructure/services/ConsolidationService.js.map +1 -0
- package/dist/lib/infrastructure/services/CurationService.d.ts +28 -0
- package/dist/lib/infrastructure/services/CurationService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/CurationService.js +112 -0
- package/dist/lib/infrastructure/services/CurationService.js.map +1 -0
- package/dist/lib/infrastructure/services/DeduplicationService.d.ts +21 -0
- package/dist/lib/infrastructure/services/DeduplicationService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/DeduplicationService.js +111 -0
- package/dist/lib/infrastructure/services/DeduplicationService.js.map +1 -0
- package/dist/lib/infrastructure/services/LlmConfigService.d.ts +19 -0
- package/dist/lib/infrastructure/services/LlmConfigService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/LlmConfigService.js +161 -0
- package/dist/lib/infrastructure/services/LlmConfigService.js.map +1 -0
- package/dist/lib/infrastructure/services/LlmDeduplicationEnhancer.d.ts +47 -0
- package/dist/lib/infrastructure/services/LlmDeduplicationEnhancer.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/LlmDeduplicationEnhancer.js +176 -0
- package/dist/lib/infrastructure/services/LlmDeduplicationEnhancer.js.map +1 -0
- package/dist/lib/infrastructure/services/LlmGuard.d.ts +29 -0
- package/dist/lib/infrastructure/services/LlmGuard.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/LlmGuard.js +92 -0
- package/dist/lib/infrastructure/services/LlmGuard.js.map +1 -0
- package/dist/lib/infrastructure/services/LlmService.d.ts +19 -0
- package/dist/lib/infrastructure/services/LlmService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/LlmService.js +253 -0
- package/dist/lib/infrastructure/services/LlmService.js.map +1 -0
- package/dist/lib/infrastructure/services/LlmUsageTracker.d.ts +25 -0
- package/dist/lib/infrastructure/services/LlmUsageTracker.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/LlmUsageTracker.js +130 -0
- package/dist/lib/infrastructure/services/LlmUsageTracker.js.map +1 -0
- package/dist/lib/infrastructure/services/MemoryService.d.ts +29 -2
- package/dist/lib/infrastructure/services/MemoryService.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/MemoryService.js +93 -0
- package/dist/lib/infrastructure/services/MemoryService.js.map +1 -1
- package/dist/lib/infrastructure/services/NlCurationService.d.ts +29 -0
- package/dist/lib/infrastructure/services/NlCurationService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/NlCurationService.js +276 -0
- package/dist/lib/infrastructure/services/NlCurationService.js.map +1 -0
- package/dist/lib/infrastructure/services/PreferenceStore.d.ts +19 -0
- package/dist/lib/infrastructure/services/PreferenceStore.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/PreferenceStore.js +109 -0
- package/dist/lib/infrastructure/services/PreferenceStore.js.map +1 -0
- package/dist/lib/infrastructure/services/SessionCaptureService.d.ts +60 -19
- package/dist/lib/infrastructure/services/SessionCaptureService.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/SessionCaptureService.js +474 -51
- package/dist/lib/infrastructure/services/SessionCaptureService.js.map +1 -1
- package/dist/lib/infrastructure/services/SummarizationService.d.ts +21 -0
- package/dist/lib/infrastructure/services/SummarizationService.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/SummarizationService.js +132 -0
- package/dist/lib/infrastructure/services/SummarizationService.js.map +1 -0
- package/dist/lib/infrastructure/services/TranscriptEnricher.d.ts +23 -0
- package/dist/lib/infrastructure/services/TranscriptEnricher.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/TranscriptEnricher.js +170 -0
- package/dist/lib/infrastructure/services/TranscriptEnricher.js.map +1 -0
- package/dist/lib/infrastructure/services/index.d.ts +12 -0
- package/dist/lib/infrastructure/services/index.d.ts.map +1 -1
- package/dist/lib/infrastructure/services/index.js +31 -1
- package/dist/lib/infrastructure/services/index.js.map +1 -1
- package/dist/lib/infrastructure/services/prompts/curation.d.ts +22 -0
- package/dist/lib/infrastructure/services/prompts/curation.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/prompts/curation.js +73 -0
- package/dist/lib/infrastructure/services/prompts/curation.js.map +1 -0
- package/dist/lib/infrastructure/services/prompts/deduplication.d.ts +31 -0
- package/dist/lib/infrastructure/services/prompts/deduplication.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/prompts/deduplication.js +52 -0
- package/dist/lib/infrastructure/services/prompts/deduplication.js.map +1 -0
- package/dist/lib/infrastructure/services/prompts/extraction.d.ts +27 -0
- package/dist/lib/infrastructure/services/prompts/extraction.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/prompts/extraction.js +94 -0
- package/dist/lib/infrastructure/services/prompts/extraction.js.map +1 -0
- package/dist/lib/infrastructure/services/prompts/summarization.d.ts +25 -0
- package/dist/lib/infrastructure/services/prompts/summarization.d.ts.map +1 -0
- package/dist/lib/infrastructure/services/prompts/summarization.js +60 -0
- package/dist/lib/infrastructure/services/prompts/summarization.js.map +1 -0
- package/dist/lib/skills/common/type-mappings.d.ts.map +1 -1
- package/dist/lib/skills/common/type-mappings.js +5 -0
- package/dist/lib/skills/common/type-mappings.js.map +1 -1
- package/dist/lib/skills/memory/memory.d.ts +8 -2
- package/dist/lib/skills/memory/memory.d.ts.map +1 -1
- package/dist/lib/skills/memory/memory.js +27 -3
- package/dist/lib/skills/memory/memory.js.map +1 -1
- package/dist/lib/skills/shared/clients/Neo4jClient.d.ts.map +1 -1
- package/dist/lib/skills/shared/clients/Neo4jClient.js +75 -30
- package/dist/lib/skills/shared/clients/Neo4jClient.js.map +1 -1
- package/dist/lib/skills/shared/clients/interfaces/INeo4jClient.d.ts +16 -0
- package/dist/lib/skills/shared/clients/interfaces/INeo4jClient.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/MemoryCliService.d.ts +28 -2
- package/dist/lib/skills/shared/services/MemoryCliService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/MemoryCliService.js +112 -5
- package/dist/lib/skills/shared/services/MemoryCliService.js.map +1 -1
- package/dist/lib/skills/shared/services/MemoryService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/MemoryService.js +410 -1
- package/dist/lib/skills/shared/services/MemoryService.js.map +1 -1
- package/dist/lib/skills/shared/services/index.d.ts +1 -1
- package/dist/lib/skills/shared/services/index.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/index.js +2 -1
- package/dist/lib/skills/shared/services/index.js.map +1 -1
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.d.ts +148 -0
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.d.ts.map +1 -1
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.js +0 -4
- package/dist/lib/skills/shared/services/interfaces/IMemoryService.js.map +1 -1
- package/dist/opencode/lisa.js +3904 -507
- package/dist/package.json +16 -16
- package/dist/project/.lisa/skills/git/SKILL.md +4 -13
- package/dist/project/.lisa/skills/init-review/SKILL.md +1 -1
- package/dist/project/.lisa/skills/jira/SKILL.md +1 -1
- package/dist/project/.lisa/skills/lisa/SKILL.md +1 -1
- package/dist/project/.lisa/skills/memory/SKILL.md +1 -2
- package/dist/project/.lisa/skills/tasks/SKILL.md +3 -4
- package/package.json +1 -1
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Task Type & Context Strategy Types
|
|
4
|
+
*
|
|
5
|
+
* Defines task types for mode-aware retrieval and context strategies
|
|
6
|
+
* that control how memory is searched based on what the user is doing.
|
|
7
|
+
*
|
|
8
|
+
* Task types:
|
|
9
|
+
* - planning: Designing architecture, making decisions, evaluating trade-offs
|
|
10
|
+
* - execution: Implementing features, writing code, building functionality
|
|
11
|
+
* - exploration: Brainstorming, investigating possibilities, research
|
|
12
|
+
* - debugging: Fixing bugs, diagnosing errors, troubleshooting
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.DETECTION_SIGNALS = exports.DEFAULT_CONTEXT_STRATEGIES = exports.TASK_TYPE_VALUES = void 0;
|
|
16
|
+
exports.isValidTaskType = isValidTaskType;
|
|
17
|
+
exports.getDefaultStrategy = getDefaultStrategy;
|
|
18
|
+
/**
|
|
19
|
+
* All valid task type values.
|
|
20
|
+
*/
|
|
21
|
+
exports.TASK_TYPE_VALUES = [
|
|
22
|
+
'planning',
|
|
23
|
+
'execution',
|
|
24
|
+
'exploration',
|
|
25
|
+
'debugging',
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* Default context strategies per task type.
|
|
29
|
+
*/
|
|
30
|
+
exports.DEFAULT_CONTEXT_STRATEGIES = {
|
|
31
|
+
planning: {
|
|
32
|
+
searchTypes: ['decision', 'retrospective', 'pattern', 'task'],
|
|
33
|
+
maxResults: 5,
|
|
34
|
+
timeout: 4000,
|
|
35
|
+
factLimit: 150,
|
|
36
|
+
searchBreadth: 5,
|
|
37
|
+
},
|
|
38
|
+
execution: {
|
|
39
|
+
searchTypes: ['pattern', 'task', 'recent'],
|
|
40
|
+
maxResults: 3,
|
|
41
|
+
timeout: 3000,
|
|
42
|
+
factLimit: 75,
|
|
43
|
+
searchBreadth: 3,
|
|
44
|
+
},
|
|
45
|
+
exploration: {
|
|
46
|
+
searchTypes: ['decision', 'pattern', 'retrospective'],
|
|
47
|
+
maxResults: 5,
|
|
48
|
+
timeout: 3000,
|
|
49
|
+
factLimit: 100,
|
|
50
|
+
searchBreadth: 5,
|
|
51
|
+
},
|
|
52
|
+
debugging: {
|
|
53
|
+
searchTypes: ['bug', 'error', 'gotcha', 'task'],
|
|
54
|
+
maxResults: 5,
|
|
55
|
+
timeout: 4000,
|
|
56
|
+
factLimit: 100,
|
|
57
|
+
searchBreadth: 4,
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Detection signal keywords per task type.
|
|
62
|
+
* Used by TaskTypeDetector for signal-based scoring.
|
|
63
|
+
*/
|
|
64
|
+
exports.DETECTION_SIGNALS = {
|
|
65
|
+
planning: [
|
|
66
|
+
'design', 'plan', 'architecture', 'should we', 'approach',
|
|
67
|
+
'strategy', 'evaluate', 'compare', 'trade-off', 'tradeoff',
|
|
68
|
+
'propose', 'consider', 'alternatives', 'decision', 'choose',
|
|
69
|
+
],
|
|
70
|
+
execution: [
|
|
71
|
+
'implement', 'add', 'create', 'build', 'write',
|
|
72
|
+
'update', 'modify', 'change', 'refactor', 'move',
|
|
73
|
+
'rename', 'extract', 'install', 'configure', 'setup',
|
|
74
|
+
],
|
|
75
|
+
exploration: [
|
|
76
|
+
'what if', 'could we', 'brainstorm', 'explore', 'investigate',
|
|
77
|
+
'research', 'look into', 'try', 'experiment', 'prototype',
|
|
78
|
+
'spike', 'discover', 'understand', 'how does', 'what does',
|
|
79
|
+
],
|
|
80
|
+
debugging: [
|
|
81
|
+
'bug', 'error', 'failing', 'broken', 'crash',
|
|
82
|
+
'fix', 'debug', 'issue', 'wrong', 'unexpected',
|
|
83
|
+
'not working', 'stack trace', 'exception', 'regression', 'flaky',
|
|
84
|
+
],
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Check if a string is a valid TaskType value.
|
|
88
|
+
*
|
|
89
|
+
* @param value - The string to check
|
|
90
|
+
* @returns true if valid task type
|
|
91
|
+
*/
|
|
92
|
+
function isValidTaskType(value) {
|
|
93
|
+
return exports.TASK_TYPE_VALUES.includes(value);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Get the default context strategy for a task type.
|
|
97
|
+
*
|
|
98
|
+
* @param taskType - The task type
|
|
99
|
+
* @returns The default context strategy
|
|
100
|
+
*/
|
|
101
|
+
function getDefaultStrategy(taskType) {
|
|
102
|
+
return exports.DEFAULT_CONTEXT_STRATEGIES[taskType];
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=ITaskType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ITaskType.js","sourceRoot":"","sources":["../../../../../src/lib/domain/interfaces/types/ITaskType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;;AAoGH,0CAEC;AAQD,gDAEC;AAzGD;;GAEG;AACU,QAAA,gBAAgB,GAAwB;IACnD,UAAU;IACV,WAAW;IACX,aAAa;IACb,WAAW;CACH,CAAC;AAkBX;;GAEG;AACU,QAAA,0BAA0B,GAAiD;IACtF,QAAQ,EAAE;QACR,WAAW,EAAE,CAAC,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,CAAC;QAC7D,UAAU,EAAE,CAAC;QACb,OAAO,EAAE,IAAI;QACb,SAAS,EAAE,GAAG;QACd,aAAa,EAAE,CAAC;KACjB;IACD,SAAS,EAAE;QACT,WAAW,EAAE,CAAC,SAAS,EAAE,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AE,OAAO;QAC5C,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,YAAY;QAC9C,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO;KACjE;CACF,CAAC;AAEF;;;;;GAKG;AACH,SAAgB,eAAe,CAAC,KAAa;IAC3C,OAAO,wBAAgB,CAAC,QAAQ,CAAC,KAAiB,CAAC,CAAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,QAAkB;IACnD,OAAO,kCAA0B,CAAC,QAAQ,CAAC,CAAC;AAC9C,CAAC"}
|
|
@@ -5,4 +5,8 @@ export { IMemoryItem, IMemoryResult, IMemoryResultBuilder, emptyMemoryResult, cr
|
|
|
5
5
|
export { TaskStatus, ITask, ITaskInput, ITaskUpdate, ITaskCounts, emptyTaskCounts } from './ITask';
|
|
6
6
|
export { ICapturedWork, emptyCapturedWork } from './ICapturedWork';
|
|
7
7
|
export { PullRequestStatus, CheckStatus, CommentStatus, IGitHubIssue, IPullRequest, IPrCheck, IPrComment, IPullRequestInput, IGitHubIssueInput, IPullRequestWithRelations, createPullRequest, createGitHubIssue, } from './IPullRequest';
|
|
8
|
+
export { MemoryLifecycle, LIFECYCLE_VALUES, LIFECYCLE_DEFAULTS, resolveLifecycleTag, parseLifecycleTag, isValidLifecycle, computeExpiresAt, } from './IMemoryLifecycle';
|
|
9
|
+
export { ConfidenceLevel, CONFIDENCE_VALUES, CONFIDENCE_SCORES, SourceType, SOURCE_VALUES, DEFAULT_CONFIDENCE, resolveConfidenceTag, parseConfidenceTag, isValidConfidence, confidenceToScore, scoreToConfidence, resolveSourceTag, parseSourceTag, isValidSource, defaultConfidenceForSource, } from './IMemoryQuality';
|
|
10
|
+
export { TaskType, TASK_TYPE_VALUES, IContextStrategy, DEFAULT_CONTEXT_STRATEGIES, DETECTION_SIGNALS, isValidTaskType, getDefaultStrategy, } from './ITaskType';
|
|
11
|
+
export { MemoryRelationType, MEMORY_RELATION_VALUES, IMemoryRelationship, RELATION_LABELS, INVERSE_RELATIONS, isValidRelationType, } from './IMemoryRelationship';
|
|
8
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/domain/interfaces/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACjI,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/domain/interfaces/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACjI,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACnG,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EACzB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,cAAc,EACd,aAAa,EACb,0BAA0B,GAC3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACjB,eAAe,EACf,kBAAkB,GACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,uBAAuB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Type interfaces (data structures).
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.createGitHubIssue = exports.createPullRequest = exports.emptyCapturedWork = exports.emptyTaskCounts = exports.createMemoryResultBuilder = exports.emptyMemoryResult = void 0;
|
|
6
|
+
exports.isValidRelationType = exports.INVERSE_RELATIONS = exports.RELATION_LABELS = exports.MEMORY_RELATION_VALUES = exports.getDefaultStrategy = exports.isValidTaskType = exports.DETECTION_SIGNALS = exports.DEFAULT_CONTEXT_STRATEGIES = exports.TASK_TYPE_VALUES = exports.defaultConfidenceForSource = exports.isValidSource = exports.parseSourceTag = exports.resolveSourceTag = exports.scoreToConfidence = exports.confidenceToScore = exports.isValidConfidence = exports.parseConfidenceTag = exports.resolveConfidenceTag = exports.DEFAULT_CONFIDENCE = exports.SOURCE_VALUES = exports.CONFIDENCE_SCORES = exports.CONFIDENCE_VALUES = exports.computeExpiresAt = exports.isValidLifecycle = exports.parseLifecycleTag = exports.resolveLifecycleTag = exports.LIFECYCLE_DEFAULTS = exports.LIFECYCLE_VALUES = exports.createGitHubIssue = exports.createPullRequest = exports.emptyCapturedWork = exports.emptyTaskCounts = exports.createMemoryResultBuilder = exports.emptyMemoryResult = void 0;
|
|
7
7
|
var IMemoryResult_1 = require("./IMemoryResult");
|
|
8
8
|
Object.defineProperty(exports, "emptyMemoryResult", { enumerable: true, get: function () { return IMemoryResult_1.emptyMemoryResult; } });
|
|
9
9
|
Object.defineProperty(exports, "createMemoryResultBuilder", { enumerable: true, get: function () { return IMemoryResult_1.createMemoryResultBuilder; } });
|
|
@@ -14,4 +14,36 @@ Object.defineProperty(exports, "emptyCapturedWork", { enumerable: true, get: fun
|
|
|
14
14
|
var IPullRequest_1 = require("./IPullRequest");
|
|
15
15
|
Object.defineProperty(exports, "createPullRequest", { enumerable: true, get: function () { return IPullRequest_1.createPullRequest; } });
|
|
16
16
|
Object.defineProperty(exports, "createGitHubIssue", { enumerable: true, get: function () { return IPullRequest_1.createGitHubIssue; } });
|
|
17
|
+
var IMemoryLifecycle_1 = require("./IMemoryLifecycle");
|
|
18
|
+
Object.defineProperty(exports, "LIFECYCLE_VALUES", { enumerable: true, get: function () { return IMemoryLifecycle_1.LIFECYCLE_VALUES; } });
|
|
19
|
+
Object.defineProperty(exports, "LIFECYCLE_DEFAULTS", { enumerable: true, get: function () { return IMemoryLifecycle_1.LIFECYCLE_DEFAULTS; } });
|
|
20
|
+
Object.defineProperty(exports, "resolveLifecycleTag", { enumerable: true, get: function () { return IMemoryLifecycle_1.resolveLifecycleTag; } });
|
|
21
|
+
Object.defineProperty(exports, "parseLifecycleTag", { enumerable: true, get: function () { return IMemoryLifecycle_1.parseLifecycleTag; } });
|
|
22
|
+
Object.defineProperty(exports, "isValidLifecycle", { enumerable: true, get: function () { return IMemoryLifecycle_1.isValidLifecycle; } });
|
|
23
|
+
Object.defineProperty(exports, "computeExpiresAt", { enumerable: true, get: function () { return IMemoryLifecycle_1.computeExpiresAt; } });
|
|
24
|
+
var IMemoryQuality_1 = require("./IMemoryQuality");
|
|
25
|
+
Object.defineProperty(exports, "CONFIDENCE_VALUES", { enumerable: true, get: function () { return IMemoryQuality_1.CONFIDENCE_VALUES; } });
|
|
26
|
+
Object.defineProperty(exports, "CONFIDENCE_SCORES", { enumerable: true, get: function () { return IMemoryQuality_1.CONFIDENCE_SCORES; } });
|
|
27
|
+
Object.defineProperty(exports, "SOURCE_VALUES", { enumerable: true, get: function () { return IMemoryQuality_1.SOURCE_VALUES; } });
|
|
28
|
+
Object.defineProperty(exports, "DEFAULT_CONFIDENCE", { enumerable: true, get: function () { return IMemoryQuality_1.DEFAULT_CONFIDENCE; } });
|
|
29
|
+
Object.defineProperty(exports, "resolveConfidenceTag", { enumerable: true, get: function () { return IMemoryQuality_1.resolveConfidenceTag; } });
|
|
30
|
+
Object.defineProperty(exports, "parseConfidenceTag", { enumerable: true, get: function () { return IMemoryQuality_1.parseConfidenceTag; } });
|
|
31
|
+
Object.defineProperty(exports, "isValidConfidence", { enumerable: true, get: function () { return IMemoryQuality_1.isValidConfidence; } });
|
|
32
|
+
Object.defineProperty(exports, "confidenceToScore", { enumerable: true, get: function () { return IMemoryQuality_1.confidenceToScore; } });
|
|
33
|
+
Object.defineProperty(exports, "scoreToConfidence", { enumerable: true, get: function () { return IMemoryQuality_1.scoreToConfidence; } });
|
|
34
|
+
Object.defineProperty(exports, "resolveSourceTag", { enumerable: true, get: function () { return IMemoryQuality_1.resolveSourceTag; } });
|
|
35
|
+
Object.defineProperty(exports, "parseSourceTag", { enumerable: true, get: function () { return IMemoryQuality_1.parseSourceTag; } });
|
|
36
|
+
Object.defineProperty(exports, "isValidSource", { enumerable: true, get: function () { return IMemoryQuality_1.isValidSource; } });
|
|
37
|
+
Object.defineProperty(exports, "defaultConfidenceForSource", { enumerable: true, get: function () { return IMemoryQuality_1.defaultConfidenceForSource; } });
|
|
38
|
+
var ITaskType_1 = require("./ITaskType");
|
|
39
|
+
Object.defineProperty(exports, "TASK_TYPE_VALUES", { enumerable: true, get: function () { return ITaskType_1.TASK_TYPE_VALUES; } });
|
|
40
|
+
Object.defineProperty(exports, "DEFAULT_CONTEXT_STRATEGIES", { enumerable: true, get: function () { return ITaskType_1.DEFAULT_CONTEXT_STRATEGIES; } });
|
|
41
|
+
Object.defineProperty(exports, "DETECTION_SIGNALS", { enumerable: true, get: function () { return ITaskType_1.DETECTION_SIGNALS; } });
|
|
42
|
+
Object.defineProperty(exports, "isValidTaskType", { enumerable: true, get: function () { return ITaskType_1.isValidTaskType; } });
|
|
43
|
+
Object.defineProperty(exports, "getDefaultStrategy", { enumerable: true, get: function () { return ITaskType_1.getDefaultStrategy; } });
|
|
44
|
+
var IMemoryRelationship_1 = require("./IMemoryRelationship");
|
|
45
|
+
Object.defineProperty(exports, "MEMORY_RELATION_VALUES", { enumerable: true, get: function () { return IMemoryRelationship_1.MEMORY_RELATION_VALUES; } });
|
|
46
|
+
Object.defineProperty(exports, "RELATION_LABELS", { enumerable: true, get: function () { return IMemoryRelationship_1.RELATION_LABELS; } });
|
|
47
|
+
Object.defineProperty(exports, "INVERSE_RELATIONS", { enumerable: true, get: function () { return IMemoryRelationship_1.INVERSE_RELATIONS; } });
|
|
48
|
+
Object.defineProperty(exports, "isValidRelationType", { enumerable: true, get: function () { return IMemoryRelationship_1.isValidRelationType; } });
|
|
17
49
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/domain/interfaces/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iDAAiI;AAAtE,kHAAA,iBAAiB,OAAA;AAAE,0HAAA,yBAAyB,OAAA;AACvG,iCAAmG;AAAjC,wGAAA,eAAe,OAAA;AACjF,iDAAmE;AAA3C,kHAAA,iBAAiB,OAAA;AACzC,+CAawB;AAFtB,iHAAA,iBAAiB,OAAA;AACjB,iHAAA,iBAAiB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/lib/domain/interfaces/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,iDAAiI;AAAtE,kHAAA,iBAAiB,OAAA;AAAE,0HAAA,yBAAyB,OAAA;AACvG,iCAAmG;AAAjC,wGAAA,eAAe,OAAA;AACjF,iDAAmE;AAA3C,kHAAA,iBAAiB,OAAA;AACzC,+CAawB;AAFtB,iHAAA,iBAAiB,OAAA;AACjB,iHAAA,iBAAiB,OAAA;AAEnB,uDAQ4B;AAN1B,oHAAA,gBAAgB,OAAA;AAChB,sHAAA,kBAAkB,OAAA;AAClB,uHAAA,mBAAmB,OAAA;AACnB,qHAAA,iBAAiB,OAAA;AACjB,oHAAA,gBAAgB,OAAA;AAChB,oHAAA,gBAAgB,OAAA;AAElB,mDAgB0B;AAdxB,mHAAA,iBAAiB,OAAA;AACjB,mHAAA,iBAAiB,OAAA;AAEjB,+GAAA,aAAa,OAAA;AACb,oHAAA,kBAAkB,OAAA;AAClB,sHAAA,oBAAoB,OAAA;AACpB,oHAAA,kBAAkB,OAAA;AAClB,mHAAA,iBAAiB,OAAA;AACjB,mHAAA,iBAAiB,OAAA;AACjB,mHAAA,iBAAiB,OAAA;AACjB,kHAAA,gBAAgB,OAAA;AAChB,gHAAA,cAAc,OAAA;AACd,+GAAA,aAAa,OAAA;AACb,4HAAA,0BAA0B,OAAA;AAE5B,yCAQqB;AANnB,6GAAA,gBAAgB,OAAA;AAEhB,uHAAA,0BAA0B,OAAA;AAC1B,8GAAA,iBAAiB,OAAA;AACjB,4GAAA,eAAe,OAAA;AACf,+GAAA,kBAAkB,OAAA;AAEpB,6DAO+B;AAL7B,6HAAA,sBAAsB,OAAA;AAEtB,sHAAA,eAAe,OAAA;AACf,wHAAA,iBAAiB,OAAA;AACjB,0HAAA,mBAAmB,OAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure deduplication detection utilities.
|
|
3
|
+
*
|
|
4
|
+
* These functions operate on plain data (arrays, sets, strings) with no
|
|
5
|
+
* infrastructure dependencies. They can be used by both the infrastructure
|
|
6
|
+
* DeduplicationService and skill-level MemoryService.
|
|
7
|
+
*/
|
|
8
|
+
import type { IMemoryItem } from '../interfaces/types';
|
|
9
|
+
import type { IConflictGroup } from '../interfaces/dal/types';
|
|
10
|
+
import type { IDuplicateGroup, IDeduplicationOptions } from '../interfaces/IDeduplicationService';
|
|
11
|
+
/**
|
|
12
|
+
* Normalize text for comparison: lowercase, trim, collapse whitespace.
|
|
13
|
+
*/
|
|
14
|
+
export declare function normalizeText(text: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Extract meaningful words from text, removing stop words.
|
|
17
|
+
* Returns a set of lowercase words.
|
|
18
|
+
*/
|
|
19
|
+
export declare function extractWords(text: string): Set<string>;
|
|
20
|
+
/**
|
|
21
|
+
* Compute Jaccard similarity between two word sets.
|
|
22
|
+
* Returns |A ∩ B| / |A ∪ B|, or 0 if both sets are empty.
|
|
23
|
+
*/
|
|
24
|
+
export declare function jaccardSimilarity(a: Set<string>, b: Set<string>): number;
|
|
25
|
+
/**
|
|
26
|
+
* Detect duplicates from a pre-loaded array of facts.
|
|
27
|
+
*
|
|
28
|
+
* Three-pass algorithm:
|
|
29
|
+
* 1. Exact match — identical normalized text
|
|
30
|
+
* 2. Tag overlap — same type:* tag with shared words (via conflict groups)
|
|
31
|
+
* 3. Similar content — Jaccard word-set similarity
|
|
32
|
+
*
|
|
33
|
+
* @param facts - Array of memory items to scan
|
|
34
|
+
* @param conflictGroups - Pre-fetched conflict groups (for tag overlap pass)
|
|
35
|
+
* @param options - Detection options
|
|
36
|
+
*/
|
|
37
|
+
export declare function detectDuplicatesFromFacts(facts: readonly IMemoryItem[], conflictGroups: readonly IConflictGroup[], options?: IDeduplicationOptions): IDuplicateGroup[];
|
|
38
|
+
//# sourceMappingURL=deduplication.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deduplication.d.ts","sourceRoot":"","sources":["../../../../src/lib/domain/utils/deduplication.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAoBlG;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAMtD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAUxE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,WAAW,EAAE,EAC7B,cAAc,EAAE,SAAS,cAAc,EAAE,EACzC,OAAO,GAAE,qBAA0B,GAClC,eAAe,EAAE,CA2JnB"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Pure deduplication detection utilities.
|
|
4
|
+
*
|
|
5
|
+
* These functions operate on plain data (arrays, sets, strings) with no
|
|
6
|
+
* infrastructure dependencies. They can be used by both the infrastructure
|
|
7
|
+
* DeduplicationService and skill-level MemoryService.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.normalizeText = normalizeText;
|
|
11
|
+
exports.extractWords = extractWords;
|
|
12
|
+
exports.jaccardSimilarity = jaccardSimilarity;
|
|
13
|
+
exports.detectDuplicatesFromFacts = detectDuplicatesFromFacts;
|
|
14
|
+
/**
|
|
15
|
+
* Common English stop words to exclude from word-set comparisons.
|
|
16
|
+
*/
|
|
17
|
+
const STOP_WORDS = new Set([
|
|
18
|
+
'the', 'a', 'an', 'is', 'was', 'are', 'were', 'be', 'been', 'being',
|
|
19
|
+
'have', 'has', 'had', 'do', 'does', 'did', 'will', 'would', 'could',
|
|
20
|
+
'should', 'may', 'might', 'shall', 'can', 'need', 'must',
|
|
21
|
+
'to', 'of', 'in', 'for', 'on', 'with', 'at', 'by', 'from', 'as',
|
|
22
|
+
'into', 'through', 'during', 'before', 'after', 'above', 'below',
|
|
23
|
+
'between', 'out', 'off', 'over', 'under', 'again', 'further', 'then',
|
|
24
|
+
'and', 'but', 'or', 'nor', 'not', 'so', 'yet', 'both', 'either',
|
|
25
|
+
'neither', 'each', 'every', 'all', 'any', 'few', 'more', 'most',
|
|
26
|
+
'other', 'some', 'such', 'no', 'only', 'same', 'than', 'too', 'very',
|
|
27
|
+
'this', 'that', 'these', 'those', 'it', 'its',
|
|
28
|
+
'i', 'me', 'my', 'we', 'our', 'you', 'your', 'he', 'him', 'his',
|
|
29
|
+
'she', 'her', 'they', 'them', 'their', 'what', 'which', 'who', 'whom',
|
|
30
|
+
]);
|
|
31
|
+
/**
|
|
32
|
+
* Normalize text for comparison: lowercase, trim, collapse whitespace.
|
|
33
|
+
*/
|
|
34
|
+
function normalizeText(text) {
|
|
35
|
+
return text.toLowerCase().trim().replace(/\s+/g, ' ');
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Extract meaningful words from text, removing stop words.
|
|
39
|
+
* Returns a set of lowercase words.
|
|
40
|
+
*/
|
|
41
|
+
function extractWords(text) {
|
|
42
|
+
const words = normalizeText(text)
|
|
43
|
+
.replace(/[^a-z0-9\s]/g, ' ')
|
|
44
|
+
.split(/\s+/)
|
|
45
|
+
.filter((w) => w.length > 1 && !STOP_WORDS.has(w));
|
|
46
|
+
return new Set(words);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Compute Jaccard similarity between two word sets.
|
|
50
|
+
* Returns |A ∩ B| / |A ∪ B|, or 0 if both sets are empty.
|
|
51
|
+
*/
|
|
52
|
+
function jaccardSimilarity(a, b) {
|
|
53
|
+
if (a.size === 0 && b.size === 0)
|
|
54
|
+
return 0;
|
|
55
|
+
let intersection = 0;
|
|
56
|
+
for (const word of a) {
|
|
57
|
+
if (b.has(word))
|
|
58
|
+
intersection++;
|
|
59
|
+
}
|
|
60
|
+
const union = a.size + b.size - intersection;
|
|
61
|
+
return union === 0 ? 0 : intersection / union;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Detect duplicates from a pre-loaded array of facts.
|
|
65
|
+
*
|
|
66
|
+
* Three-pass algorithm:
|
|
67
|
+
* 1. Exact match — identical normalized text
|
|
68
|
+
* 2. Tag overlap — same type:* tag with shared words (via conflict groups)
|
|
69
|
+
* 3. Similar content — Jaccard word-set similarity
|
|
70
|
+
*
|
|
71
|
+
* @param facts - Array of memory items to scan
|
|
72
|
+
* @param conflictGroups - Pre-fetched conflict groups (for tag overlap pass)
|
|
73
|
+
* @param options - Detection options
|
|
74
|
+
*/
|
|
75
|
+
function detectDuplicatesFromFacts(facts, conflictGroups, options = {}) {
|
|
76
|
+
const { minSimilarity = 0.6, limit = 10 } = options;
|
|
77
|
+
const groups = [];
|
|
78
|
+
const claimed = new Set(); // Track facts already in a group (by uuid)
|
|
79
|
+
// Pass 1: Exact match — group by normalized fact text
|
|
80
|
+
const normalizedMap = new Map();
|
|
81
|
+
for (const fact of facts) {
|
|
82
|
+
if (!fact.fact || !fact.uuid)
|
|
83
|
+
continue;
|
|
84
|
+
const key = normalizeText(fact.fact);
|
|
85
|
+
const existing = normalizedMap.get(key);
|
|
86
|
+
if (existing) {
|
|
87
|
+
existing.push(fact);
|
|
88
|
+
}
|
|
89
|
+
else {
|
|
90
|
+
normalizedMap.set(key, [fact]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
for (const members of normalizedMap.values()) {
|
|
94
|
+
if (members.length < 2)
|
|
95
|
+
continue;
|
|
96
|
+
for (const m of members) {
|
|
97
|
+
if (m.uuid)
|
|
98
|
+
claimed.add(m.uuid);
|
|
99
|
+
}
|
|
100
|
+
groups.push({
|
|
101
|
+
reason: 'exact-match',
|
|
102
|
+
facts: members,
|
|
103
|
+
similarity: 1.0,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
// Pass 2: Tag overlap — use conflict groups (facts sharing type:* tags)
|
|
107
|
+
for (const cg of conflictGroups) {
|
|
108
|
+
// Filter out already-claimed facts
|
|
109
|
+
const unclaimed = cg.facts.filter((f) => f.uuid && !claimed.has(f.uuid));
|
|
110
|
+
if (unclaimed.length < 2)
|
|
111
|
+
continue;
|
|
112
|
+
// Check pairwise word overlap — need 3+ common words
|
|
113
|
+
const wordSets = unclaimed.map((f) => ({
|
|
114
|
+
fact: f,
|
|
115
|
+
words: extractWords(f.fact ?? ''),
|
|
116
|
+
}));
|
|
117
|
+
const tagGroup = [];
|
|
118
|
+
const tagGroupUuids = new Set();
|
|
119
|
+
let maxOverlapRatio = 0;
|
|
120
|
+
for (let i = 0; i < wordSets.length; i++) {
|
|
121
|
+
for (let j = i + 1; j < wordSets.length; j++) {
|
|
122
|
+
const a = wordSets[i];
|
|
123
|
+
const b = wordSets[j];
|
|
124
|
+
let commonCount = 0;
|
|
125
|
+
for (const w of a.words) {
|
|
126
|
+
if (b.words.has(w))
|
|
127
|
+
commonCount++;
|
|
128
|
+
}
|
|
129
|
+
if (commonCount >= 3) {
|
|
130
|
+
if (a.fact.uuid && !tagGroupUuids.has(a.fact.uuid)) {
|
|
131
|
+
tagGroupUuids.add(a.fact.uuid);
|
|
132
|
+
tagGroup.push(a.fact);
|
|
133
|
+
}
|
|
134
|
+
if (b.fact.uuid && !tagGroupUuids.has(b.fact.uuid)) {
|
|
135
|
+
tagGroupUuids.add(b.fact.uuid);
|
|
136
|
+
tagGroup.push(b.fact);
|
|
137
|
+
}
|
|
138
|
+
const ratio = jaccardSimilarity(a.words, b.words);
|
|
139
|
+
if (ratio > maxOverlapRatio)
|
|
140
|
+
maxOverlapRatio = ratio;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
if (tagGroup.length >= 2) {
|
|
145
|
+
// Scale similarity: 0.5 base + ratio contribution (cap at 0.8)
|
|
146
|
+
const similarity = Math.min(0.5 + maxOverlapRatio * 0.3, 0.8);
|
|
147
|
+
for (const f of tagGroup) {
|
|
148
|
+
if (f.uuid)
|
|
149
|
+
claimed.add(f.uuid);
|
|
150
|
+
}
|
|
151
|
+
groups.push({
|
|
152
|
+
reason: 'tag-overlap',
|
|
153
|
+
facts: tagGroup,
|
|
154
|
+
similarity: Math.round(similarity * 100) / 100,
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
// Pass 3: Similar content — Jaccard similarity on unclaimed facts
|
|
159
|
+
const unclaimedFacts = facts.filter((f) => f.uuid && f.fact && !claimed.has(f.uuid));
|
|
160
|
+
if (unclaimedFacts.length >= 2) {
|
|
161
|
+
const wordSets = unclaimedFacts.map((f) => ({
|
|
162
|
+
fact: f,
|
|
163
|
+
words: extractWords(f.fact ?? ''),
|
|
164
|
+
}));
|
|
165
|
+
// Build adjacency: pair facts with similarity >= threshold
|
|
166
|
+
const adjacency = new Map();
|
|
167
|
+
const pairSimilarities = new Map();
|
|
168
|
+
for (let i = 0; i < wordSets.length; i++) {
|
|
169
|
+
for (let j = i + 1; j < wordSets.length; j++) {
|
|
170
|
+
const sim = jaccardSimilarity(wordSets[i].words, wordSets[j].words);
|
|
171
|
+
if (sim >= minSimilarity) {
|
|
172
|
+
const key = `${i}:${j}`;
|
|
173
|
+
pairSimilarities.set(key, sim);
|
|
174
|
+
if (!adjacency.has(i))
|
|
175
|
+
adjacency.set(i, []);
|
|
176
|
+
if (!adjacency.has(j))
|
|
177
|
+
adjacency.set(j, []);
|
|
178
|
+
adjacency.get(i).push(j);
|
|
179
|
+
adjacency.get(j).push(i);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
// Build transitive groups via BFS
|
|
184
|
+
const visited = new Set();
|
|
185
|
+
for (const [start] of adjacency) {
|
|
186
|
+
if (visited.has(start))
|
|
187
|
+
continue;
|
|
188
|
+
const queue = [start];
|
|
189
|
+
const component = [];
|
|
190
|
+
let maxSim = 0;
|
|
191
|
+
while (queue.length > 0) {
|
|
192
|
+
const node = queue.shift();
|
|
193
|
+
if (visited.has(node))
|
|
194
|
+
continue;
|
|
195
|
+
visited.add(node);
|
|
196
|
+
component.push(node);
|
|
197
|
+
for (const neighbor of adjacency.get(node) ?? []) {
|
|
198
|
+
if (!visited.has(neighbor)) {
|
|
199
|
+
queue.push(neighbor);
|
|
200
|
+
}
|
|
201
|
+
const pairKey = node < neighbor ? `${node}:${neighbor}` : `${neighbor}:${node}`;
|
|
202
|
+
const sim = pairSimilarities.get(pairKey) ?? 0;
|
|
203
|
+
if (sim > maxSim)
|
|
204
|
+
maxSim = sim;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
if (component.length >= 2) {
|
|
208
|
+
const members = component.map((idx) => wordSets[idx].fact);
|
|
209
|
+
for (const f of members) {
|
|
210
|
+
if (f.uuid)
|
|
211
|
+
claimed.add(f.uuid);
|
|
212
|
+
}
|
|
213
|
+
groups.push({
|
|
214
|
+
reason: 'similar-content',
|
|
215
|
+
facts: members,
|
|
216
|
+
similarity: Math.round(maxSim * 100) / 100,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
// Sort by similarity descending, apply limit
|
|
222
|
+
groups.sort((a, b) => b.similarity - a.similarity);
|
|
223
|
+
return groups.slice(0, limit);
|
|
224
|
+
}
|
|
225
|
+
//# sourceMappingURL=deduplication.js.map
|
|
@@ -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C,GAAG,IAAI,IAAI,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,IAAI,EAAE,CAAC;oBAChF,MAAM,GAAG,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;oBAC/C,IAAI,GAAG,GAAG,MAAM;wBAAE,MAAM,GAAG,GAAG,CAAC;gBACjC,CAAC;YACH,CAAC;YAED,IAAI,SAAS,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;gBAC1B,MAAM,OAAO,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;gBAC3D,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;oBACxB,IAAI,CAAC,CAAC,IAAI;wBAAE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;gBAClC,CAAC;gBACD,MAAM,CAAC,IAAI,CAAC;oBACV,MAAM,EAAE,iBAAiB;oBACzB,KAAK,EAAE,OAAO;oBACd,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,GAAG,GAAG;iBAC3C,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC;IAED,6CAA6C;IAC7C,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC;IACnD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
* application and infrastructure layers.
|
|
6
6
|
*/
|
|
7
7
|
export { CancellationError, isCancellationError, withCancellation, checkCancellation, createDeferred, type CancellableOptions, type CancellableResult, type Deferred, } from './cancellation';
|
|
8
|
+
export { normalizeText, extractWords, jaccardSimilarity, detectDuplicatesFromFacts, } from './deduplication';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/domain/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,GACd,MAAM,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/domain/utils/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,GACd,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,yBAAyB,GAC1B,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createDeferred = exports.checkCancellation = exports.withCancellation = exports.isCancellationError = exports.CancellationError = void 0;
|
|
3
|
+
exports.detectDuplicatesFromFacts = exports.jaccardSimilarity = exports.extractWords = exports.normalizeText = exports.createDeferred = exports.checkCancellation = exports.withCancellation = exports.isCancellationError = exports.CancellationError = void 0;
|
|
4
4
|
/**
|
|
5
5
|
* Domain utilities.
|
|
6
6
|
*
|
|
@@ -13,4 +13,9 @@ Object.defineProperty(exports, "isCancellationError", { enumerable: true, get: f
|
|
|
13
13
|
Object.defineProperty(exports, "withCancellation", { enumerable: true, get: function () { return cancellation_1.withCancellation; } });
|
|
14
14
|
Object.defineProperty(exports, "checkCancellation", { enumerable: true, get: function () { return cancellation_1.checkCancellation; } });
|
|
15
15
|
Object.defineProperty(exports, "createDeferred", { enumerable: true, get: function () { return cancellation_1.createDeferred; } });
|
|
16
|
+
var deduplication_1 = require("./deduplication");
|
|
17
|
+
Object.defineProperty(exports, "normalizeText", { enumerable: true, get: function () { return deduplication_1.normalizeText; } });
|
|
18
|
+
Object.defineProperty(exports, "extractWords", { enumerable: true, get: function () { return deduplication_1.extractWords; } });
|
|
19
|
+
Object.defineProperty(exports, "jaccardSimilarity", { enumerable: true, get: function () { return deduplication_1.jaccardSimilarity; } });
|
|
20
|
+
Object.defineProperty(exports, "detectDuplicatesFromFacts", { enumerable: true, get: function () { return deduplication_1.detectDuplicatesFromFacts; } });
|
|
16
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/domain/utils/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,+CASwB;AARtB,iHAAA,iBAAiB,OAAA;AACjB,mHAAA,mBAAmB,OAAA;AACnB,gHAAA,gBAAgB,OAAA;AAChB,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/domain/utils/index.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,+CASwB;AARtB,iHAAA,iBAAiB,OAAA;AACjB,mHAAA,mBAAmB,OAAA;AACnB,gHAAA,gBAAgB,OAAA;AAChB,iHAAA,iBAAiB,OAAA;AACjB,8GAAA,cAAc,OAAA;AAMhB,iDAKyB;AAJvB,8GAAA,aAAa,OAAA;AACb,6GAAA,YAAY,OAAA;AACZ,kHAAA,iBAAiB,OAAA;AACjB,0HAAA,yBAAyB,OAAA"}
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* Supports semantic search and write operations.
|
|
6
6
|
*/
|
|
7
7
|
import type { IMemoryItem } from '../../../../domain/interfaces/types/IMemoryResult';
|
|
8
|
-
import type { IMemoryRepository, IMemorySaveOptions, IQueryOptions, IMemoryQueryResult } from '../../../../domain/interfaces/dal';
|
|
8
|
+
import type { IMemoryRepository, IMemoryRepositoryExpiration, IMemorySaveOptions, IQueryOptions, IMemoryQueryResult, IExpirationFilter } from '../../../../domain/interfaces/dal';
|
|
9
9
|
import { McpConnectionManager } from '../../connections/McpConnectionManager';
|
|
10
10
|
/**
|
|
11
11
|
* MCP Memory Repository implementation.
|
|
12
12
|
* Full read/write support via Graphiti MCP.
|
|
13
13
|
*/
|
|
14
|
-
export declare class McpMemoryRepository implements IMemoryRepository {
|
|
14
|
+
export declare class McpMemoryRepository implements IMemoryRepository, IMemoryRepositoryExpiration {
|
|
15
15
|
private readonly connection;
|
|
16
16
|
constructor(connection: McpConnectionManager);
|
|
17
17
|
/**
|
|
@@ -34,6 +34,16 @@ export declare class McpMemoryRepository implements IMemoryRepository {
|
|
|
34
34
|
* Save multiple facts in batch.
|
|
35
35
|
*/
|
|
36
36
|
saveBatch(groupId: string, facts: readonly string[], options?: IMemorySaveOptions): Promise<readonly IMemoryItem[]>;
|
|
37
|
+
/**
|
|
38
|
+
* MCP does not support direct expiration.
|
|
39
|
+
* Expiration must be performed via Neo4j direct.
|
|
40
|
+
*/
|
|
41
|
+
expire(_groupId: string, _uuid: string): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* MCP does not support direct expiration by filter.
|
|
44
|
+
* Expiration must be performed via Neo4j direct.
|
|
45
|
+
*/
|
|
46
|
+
expireByFilter(_groupId: string, _filter: IExpirationFilter): Promise<number>;
|
|
37
47
|
/**
|
|
38
48
|
* MCP supports semantic search via embeddings.
|
|
39
49
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpMemoryRepository.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"McpMemoryRepository.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mDAAmD,CAAC;AACrF,OAAO,KAAK,EACV,iBAAiB,EACjB,2BAA2B,EAC3B,kBAAkB,EAClB,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAwB9E;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,iBAAiB,EAAE,2BAA2B;IAC5E,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAAV,UAAU,EAAE,oBAAoB;IAE7D;;OAEG;IACG,cAAc,CAClB,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,OAAO,CAAC,EAAE,aAAa,GACtB,OAAO,CAAC,kBAAkB,CAAC;IAuC9B;;OAEG;IACG,MAAM,CACV,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,KAAK,EAAE,MAAM,EACb,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,OAAO,CAAC,GACrC,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;OAEG;IACG,UAAU,CACd,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,IAAI,CAAC,aAAa,EAAE,MAAM,CAAC,GACpC,OAAO,CAAC,kBAAkB,CAAC;IAI9B;;OAEG;IACG,IAAI,CACR,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,WAAW,CAAC;IAsBvB;;OAEG;IACG,SAAS,CACb,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,SAAS,MAAM,EAAE,EACxB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,SAAS,WAAW,EAAE,CAAC;IAiBlC;;;OAGG;IACG,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5D;;;OAGG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,CAAC;IAMnF;;OAEG;IACH,sBAAsB,IAAI,OAAO;IAIjC;;OAEG;IACH,oBAAoB,IAAI,OAAO;IAI/B;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,OAAO,CAAC,YAAY;CASrB"}
|
|
@@ -96,6 +96,20 @@ class McpMemoryRepository {
|
|
|
96
96
|
}
|
|
97
97
|
return results;
|
|
98
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* MCP does not support direct expiration.
|
|
101
|
+
* Expiration must be performed via Neo4j direct.
|
|
102
|
+
*/
|
|
103
|
+
async expire(_groupId, _uuid) {
|
|
104
|
+
throw new Error('MCP does not support direct expiration. Use Neo4j repository instead.');
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* MCP does not support direct expiration by filter.
|
|
108
|
+
* Expiration must be performed via Neo4j direct.
|
|
109
|
+
*/
|
|
110
|
+
async expireByFilter(_groupId, _filter) {
|
|
111
|
+
throw new Error('MCP does not support direct expiration. Use Neo4j repository instead.');
|
|
112
|
+
}
|
|
99
113
|
/**
|
|
100
114
|
* MCP supports semantic search via embeddings.
|
|
101
115
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpMemoryRepository.js","sourceRoot":"","sources":["../../../../../../src/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;
|
|
1
|
+
{"version":3,"file":"McpMemoryRepository.js","sourceRoot":"","sources":["../../../../../../src/lib/infrastructure/dal/repositories/mcp/McpMemoryRepository.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAWH,2DAAuE;AAyBvE;;;GAGG;AACH,MAAa,mBAAmB;IAC9B,YAA6B,UAAgC;QAAhC,eAAU,GAAV,UAAU,CAAsB;IAAG,CAAC;IAEjE;;OAEG;IACH,KAAK,CAAC,cAAc,CAClB,QAA2B,EAC3B,OAAuB;QAEvB,MAAM,IAAI,GAAG,IAAA,wBAAkB,EAAC,OAAO,CAAC,CAAC;QACzC,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;QAEpC,MAAM,MAAM,GAA4B;YACtC,KAAK,EAAE,KAAK,IAAI,GAAG;YACnB,SAAS,EAAE,KAAK;YAChB,SAAS,EAAE,CAAC,GAAG,QAAQ,CAAC;SACzB,CAAC;QAEF,IAAI,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;QAC1B,CAAC;QAED,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACzC,qBAAqB,EACrB,MAAM,CACP,CAAC;QAEF,MAAM,KAAK,GAAG,QAAQ,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,EAAE,CAAC;QAC/D,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QAE3C,oDAAoD;QACpD,sDAAsD;QACtD,IAAI,CAAC,KAAK,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YAC5B,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAClB,MAAM,KAAK,GAA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