minovative-mind-cli 2.9.0 → 2.10.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/README.md +14 -6
- package/dist/services/agent/inputHandler.d.ts +18 -3
- package/dist/services/agent/inputHandler.js +54 -29
- package/dist/services/agent/slashCommands.js +12 -2
- package/dist/services/agent.js +3 -0
- package/dist/services/ai.d.ts +2 -1
- package/dist/services/ai.js +130 -12
- package/dist/services/contextAgent.js +35 -4
- package/dist/services/investigationComplexity.d.ts +1 -1
- package/dist/services/investigationComplexity.js +1 -1
- package/dist/services/orchestration/investigationCache.d.ts +80 -5
- package/dist/services/orchestration/investigationCache.js +570 -41
- package/dist/services/orchestration/investigationOrchestrator.js +11 -2
- package/dist/utils/contextPrompts.d.ts +1 -1
- package/dist/utils/contextPrompts.js +18 -1
- package/dist/utils/systemPrompts.d.ts +2 -1
- package/dist/utils/systemPrompts.js +36 -7
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
|
@@ -1,25 +1,100 @@
|
|
|
1
|
+
export interface SemanticMetadata {
|
|
2
|
+
topics: string[];
|
|
3
|
+
components: string[];
|
|
4
|
+
intent: string;
|
|
5
|
+
reasoning?: string;
|
|
6
|
+
}
|
|
1
7
|
export interface InvestigationCacheEntry {
|
|
2
8
|
promptHash: string;
|
|
9
|
+
normalizedPrompt: string;
|
|
10
|
+
topics?: string[];
|
|
11
|
+
components?: string[];
|
|
12
|
+
intent?: string;
|
|
13
|
+
semanticSignature?: string;
|
|
3
14
|
relevantFiles: string[];
|
|
4
15
|
summary: string;
|
|
5
16
|
workspaceFingerprint: string;
|
|
6
17
|
createdAt: number;
|
|
18
|
+
lastAccessedAt: number;
|
|
19
|
+
hitCount?: number;
|
|
7
20
|
}
|
|
8
21
|
export interface InvestigationCacheStore {
|
|
9
22
|
entries: Record<string, InvestigationCacheEntry>;
|
|
23
|
+
totalHits?: number;
|
|
24
|
+
totalMisses?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface LookupInvestigationOptions {
|
|
27
|
+
abortSignal?: AbortSignal;
|
|
28
|
+
allowSemanticFallback?: boolean;
|
|
29
|
+
semanticSession?: any;
|
|
30
|
+
onProgress?: (message: string) => void;
|
|
31
|
+
fuzzyThreshold?: number;
|
|
32
|
+
semanticThreshold?: number;
|
|
10
33
|
}
|
|
34
|
+
export interface LookupInvestigationResult {
|
|
35
|
+
entry: InvestigationCacheEntry;
|
|
36
|
+
bytesSaved: number;
|
|
37
|
+
matchTier: 'exact' | 'fuzzy' | 'semantic';
|
|
38
|
+
similarityScore?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare const MAX_CACHE_SIZE_BYTES: number;
|
|
41
|
+
export declare const DEFAULT_FUZZY_THRESHOLD = 0.85;
|
|
42
|
+
export declare const DEFAULT_SEMANTIC_THRESHOLD = 0.7;
|
|
43
|
+
/**
|
|
44
|
+
* Normalizes prompt by trimming, collapsing whitespace, and stripping common conversation prefixes.
|
|
45
|
+
*/
|
|
11
46
|
export declare function normalizePrompt(prompt: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Computes SHA-256 hash of a normalized prompt string.
|
|
49
|
+
*/
|
|
12
50
|
export declare function hashPrompt(normalized: string): string;
|
|
51
|
+
/**
|
|
52
|
+
* Generates a deterministic signature from topics, components, and intent.
|
|
53
|
+
*/
|
|
54
|
+
export declare function generateSemanticSignature(topics: string[], components: string[], intent?: string): string;
|
|
55
|
+
/**
|
|
56
|
+
* Offline heuristic semantic metadata extractor.
|
|
57
|
+
*/
|
|
58
|
+
export declare function extractHeuristicSemanticMetadata(prompt: string, relevantFiles?: string[]): SemanticMetadata;
|
|
59
|
+
/**
|
|
60
|
+
* Classifies prompt semantic intent and entity tags using AI or offline heuristic fallback.
|
|
61
|
+
*/
|
|
62
|
+
export declare function classifySemanticIntent(userPrompt: string, abortSignal?: AbortSignal, customSession?: any, timeoutMs?: number): Promise<SemanticMetadata | null>;
|
|
63
|
+
/**
|
|
64
|
+
* Computes a SHA-256 fingerprint of the relevant files' mtime and sizes.
|
|
65
|
+
*/
|
|
13
66
|
export declare function generateWorkspaceFingerprint(workspaceRoot: string, relevantFiles: string[]): Promise<string>;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
67
|
+
/**
|
|
68
|
+
* Enforces LRU eviction to keep cache store below MAX_CACHE_SIZE_BYTES (5MB).
|
|
69
|
+
*/
|
|
70
|
+
export declare function pruneCacheStore(store: InvestigationCacheStore): void;
|
|
71
|
+
/**
|
|
72
|
+
* Looks up cached investigation results using a 2-Tier matching pipeline:
|
|
73
|
+
* - Tier 1A: Exact hash match
|
|
74
|
+
* - Tier 1B: Local fuzzy Levenshtein & token similarity match
|
|
75
|
+
* - Tier 2: AI semantic topic & component classification match
|
|
76
|
+
* All candidates validate the workspace fingerprint before returning.
|
|
77
|
+
*/
|
|
78
|
+
export declare function lookupInvestigation(workspaceRoot: string, userPrompt: string, options?: LookupInvestigationOptions): Promise<LookupInvestigationResult | null>;
|
|
79
|
+
/**
|
|
80
|
+
* Saves investigation context with semantic tagging, workspace fingerprint, and LRU pruning.
|
|
81
|
+
*/
|
|
82
|
+
export declare function saveInvestigation(workspaceRoot: string, userPrompt: string, relevantFiles: string[], summary: string, semanticMetadata?: Partial<SemanticMetadata>, abortSignal?: AbortSignal): Promise<void>;
|
|
83
|
+
/**
|
|
84
|
+
* Invalidates cache entries that reference any changed files.
|
|
85
|
+
*/
|
|
19
86
|
export declare function invalidateFilesFromInvestigationCache(workspaceRoot: string, changedFiles: string[]): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Clears all entries in the investigation cache.
|
|
89
|
+
*/
|
|
90
|
+
export declare function clearInvestigationCache(workspaceRoot: string): void;
|
|
91
|
+
/**
|
|
92
|
+
* Returns cache statistics for inspection and telemetry.
|
|
93
|
+
*/
|
|
20
94
|
export declare function getInvestigationCacheStats(workspaceRoot: string): {
|
|
21
95
|
entries: number;
|
|
22
96
|
sizeBytes: number;
|
|
23
97
|
hitCount: number;
|
|
24
98
|
missCount: number;
|
|
99
|
+
topicsCount: number;
|
|
25
100
|
};
|