logixia 1.12.4 → 1.12.6

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.
Files changed (166) hide show
  1. package/README.md +80 -27
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/async-context-CSHWoHMB.js +88 -0
  4. package/dist/async-context-CSHWoHMB.js.map +1 -0
  5. package/dist/async-context-CwBNMm2E.mjs +68 -0
  6. package/dist/async-context-CwBNMm2E.mjs.map +1 -0
  7. package/dist/azure-monitor.transport-CG7ClkYj.d.ts +62 -0
  8. package/dist/azure-monitor.transport-CG7ClkYj.d.ts.map +1 -0
  9. package/dist/azure-monitor.transport-CHnjVRF-.mjs +152 -0
  10. package/dist/azure-monitor.transport-CHnjVRF-.mjs.map +1 -0
  11. package/dist/azure-monitor.transport-Cm74kXZS.d.mts +62 -0
  12. package/dist/azure-monitor.transport-Cm74kXZS.d.mts.map +1 -0
  13. package/dist/azure-monitor.transport-CrvfHd9C.js +157 -0
  14. package/dist/azure-monitor.transport-CrvfHd9C.js.map +1 -0
  15. package/dist/azure.d.mts +3 -0
  16. package/dist/azure.d.ts +3 -0
  17. package/dist/azure.js +6 -0
  18. package/dist/azure.mjs +6 -0
  19. package/dist/batch-buffer-BY-mRWIK.js +170 -0
  20. package/dist/batch-buffer-BY-mRWIK.js.map +1 -0
  21. package/dist/batch-buffer-PGvSgbmd.mjs +132 -0
  22. package/dist/batch-buffer-PGvSgbmd.mjs.map +1 -0
  23. package/dist/browser.d.mts +427 -0
  24. package/dist/browser.d.mts.map +1 -0
  25. package/dist/browser.d.ts +427 -0
  26. package/dist/browser.d.ts.map +1 -0
  27. package/dist/browser.js +590 -0
  28. package/dist/browser.js.map +1 -0
  29. package/dist/browser.mjs +586 -0
  30. package/dist/browser.mjs.map +1 -0
  31. package/dist/chunk-DLSkYcPk.mjs +7 -0
  32. package/dist/chunk-nOFOJqeH.js +30 -0
  33. package/dist/cloudwatch.d.mts +3 -0
  34. package/dist/cloudwatch.d.ts +3 -0
  35. package/dist/cloudwatch.js +6 -0
  36. package/dist/cloudwatch.mjs +6 -0
  37. package/dist/cloudwatch.transport-CGHY4buE.d.mts +81 -0
  38. package/dist/cloudwatch.transport-CGHY4buE.d.mts.map +1 -0
  39. package/dist/cloudwatch.transport-DK_8cKd3.d.ts +81 -0
  40. package/dist/cloudwatch.transport-DK_8cKd3.d.ts.map +1 -0
  41. package/dist/cloudwatch.transport-pNBNWJLt.js +370 -0
  42. package/dist/cloudwatch.transport-pNBNWJLt.js.map +1 -0
  43. package/dist/cloudwatch.transport-yBwm4OeO.mjs +360 -0
  44. package/dist/cloudwatch.transport-yBwm4OeO.mjs.map +1 -0
  45. package/dist/coerce.utils-BN980Y9V.js +44 -0
  46. package/dist/coerce.utils-BN980Y9V.js.map +1 -0
  47. package/dist/coerce.utils-Dxv4_ikC.mjs +38 -0
  48. package/dist/coerce.utils-Dxv4_ikC.mjs.map +1 -0
  49. package/dist/correlation.d.mts +238 -0
  50. package/dist/correlation.d.mts.map +1 -0
  51. package/dist/correlation.d.ts +238 -0
  52. package/dist/correlation.d.ts.map +1 -0
  53. package/dist/correlation.js +272 -0
  54. package/dist/correlation.js.map +1 -0
  55. package/dist/correlation.mjs +261 -0
  56. package/dist/correlation.mjs.map +1 -0
  57. package/dist/gcp.d.mts +3 -0
  58. package/dist/gcp.d.ts +3 -0
  59. package/dist/gcp.js +6 -0
  60. package/dist/gcp.mjs +6 -0
  61. package/dist/gcp.transport-BJuNRFe_.mjs +192 -0
  62. package/dist/gcp.transport-BJuNRFe_.mjs.map +1 -0
  63. package/dist/gcp.transport-BOhkVKlI.d.ts +71 -0
  64. package/dist/gcp.transport-BOhkVKlI.d.ts.map +1 -0
  65. package/dist/gcp.transport-Bi6CUqZR.d.mts +71 -0
  66. package/dist/gcp.transport-Bi6CUqZR.d.mts.map +1 -0
  67. package/dist/gcp.transport-SHdtc1n0.js +198 -0
  68. package/dist/gcp.transport-SHdtc1n0.js.map +1 -0
  69. package/dist/{index-CwFww7VC.d.ts → index-BPKwwERo.d.mts} +18 -174
  70. package/dist/index-BPKwwERo.d.mts.map +1 -0
  71. package/dist/{index-DnyeaoZU.d.mts → index-C1X-TE5I.d.ts} +18 -174
  72. package/dist/index-C1X-TE5I.d.ts.map +1 -0
  73. package/dist/index.d.mts +41 -11
  74. package/dist/index.d.mts.map +1 -1
  75. package/dist/index.d.ts +40 -10
  76. package/dist/index.d.ts.map +1 -1
  77. package/dist/index.js +87 -147
  78. package/dist/index.js.map +1 -1
  79. package/dist/index.mjs +62 -132
  80. package/dist/index.mjs.map +1 -1
  81. package/dist/internal-log-BUJYMZbE.js +70 -0
  82. package/dist/internal-log-BUJYMZbE.js.map +1 -0
  83. package/dist/internal-log-Cm8SOWSV.mjs +52 -0
  84. package/dist/internal-log-Cm8SOWSV.mjs.map +1 -0
  85. package/dist/{logitron-logger.module-BIGTm2V6.mjs → logitron-logger.module-Bs3XYZgF.mjs} +266 -166
  86. package/dist/logitron-logger.module-Bs3XYZgF.mjs.map +1 -0
  87. package/dist/{logitron-logger.module-BTxDpK6u.js → logitron-logger.module-BsDZR5BH.js} +297 -203
  88. package/dist/logitron-logger.module-BsDZR5BH.js.map +1 -0
  89. package/dist/{logitron-logger.module-BmT-ewin.d.ts → logitron-logger.module-CxT1F6Cm.d.ts} +23 -10
  90. package/dist/logitron-logger.module-CxT1F6Cm.d.ts.map +1 -0
  91. package/dist/{logitron-logger.module-BCq3sF27.d.mts → logitron-logger.module-zDKVd_o0.d.mts} +23 -10
  92. package/dist/logitron-logger.module-zDKVd_o0.d.mts.map +1 -0
  93. package/dist/middleware.d.mts +5 -2
  94. package/dist/middleware.d.mts.map +1 -1
  95. package/dist/middleware.d.ts +5 -2
  96. package/dist/middleware.d.ts.map +1 -1
  97. package/dist/middleware.js +13 -4
  98. package/dist/middleware.js.map +1 -1
  99. package/dist/middleware.mjs +14 -4
  100. package/dist/middleware.mjs.map +1 -1
  101. package/dist/nest.d.mts +3 -2
  102. package/dist/nest.d.mts.map +1 -1
  103. package/dist/nest.d.ts +3 -2
  104. package/dist/nest.d.ts.map +1 -1
  105. package/dist/nest.js +6 -2
  106. package/dist/nest.mjs +6 -2
  107. package/dist/safe-stringify-DJ66tW5I.mjs +118 -0
  108. package/dist/safe-stringify-DJ66tW5I.mjs.map +1 -0
  109. package/dist/safe-stringify-DWo3aZp_.js +142 -0
  110. package/dist/safe-stringify-DWo3aZp_.js.map +1 -0
  111. package/dist/search-CFQRISUv.mjs +1596 -0
  112. package/dist/search-CFQRISUv.mjs.map +1 -0
  113. package/dist/search-CQOo-Iq6.d.mts +816 -0
  114. package/dist/search-CQOo-Iq6.d.mts.map +1 -0
  115. package/dist/search-DujhR94O.d.ts +816 -0
  116. package/dist/search-DujhR94O.d.ts.map +1 -0
  117. package/dist/search-njTI2hdo.js +1631 -0
  118. package/dist/search-njTI2hdo.js.map +1 -0
  119. package/dist/search.d.mts +4 -1
  120. package/dist/search.d.ts +4 -1
  121. package/dist/search.js +9 -1
  122. package/dist/search.mjs +3 -2
  123. package/dist/testing.d.mts +2 -1
  124. package/dist/testing.d.mts.map +1 -1
  125. package/dist/testing.d.ts +2 -1
  126. package/dist/testing.d.ts.map +1 -1
  127. package/dist/{transport.manager-ciG4r5uz.js → transport.manager-BivyUTtU.js} +497 -437
  128. package/dist/transport.manager-BivyUTtU.js.map +1 -0
  129. package/dist/{transport.manager-DETpXuaY.mjs → transport.manager-D6KL3t9V.mjs} +473 -364
  130. package/dist/transport.manager-D6KL3t9V.mjs.map +1 -0
  131. package/dist/transport.types-B5vcyv2k.d.mts +187 -0
  132. package/dist/transport.types-B5vcyv2k.d.mts.map +1 -0
  133. package/dist/transport.types-BuY84TwO.d.ts +187 -0
  134. package/dist/transport.types-BuY84TwO.d.ts.map +1 -0
  135. package/dist/transports.d.mts +90 -29
  136. package/dist/transports.d.mts.map +1 -1
  137. package/dist/transports.d.ts +90 -29
  138. package/dist/transports.d.ts.map +1 -1
  139. package/dist/transports.js +14 -2
  140. package/dist/transports.mjs +10 -2
  141. package/dist/worker-entry.js +1241 -0
  142. package/dist/worker.d.mts +3 -0
  143. package/dist/worker.d.ts +3 -0
  144. package/dist/worker.js +4 -0
  145. package/dist/worker.mjs +4 -0
  146. package/dist/worker.transport-BP8Q28Z2.d.mts +76 -0
  147. package/dist/worker.transport-BP8Q28Z2.d.mts.map +1 -0
  148. package/dist/worker.transport-BhMyvqQ2.mjs +167 -0
  149. package/dist/worker.transport-BhMyvqQ2.mjs.map +1 -0
  150. package/dist/worker.transport-CfH6z37Z.js +168 -0
  151. package/dist/worker.transport-CfH6z37Z.js.map +1 -0
  152. package/dist/worker.transport-mKXgNK0L.d.ts +76 -0
  153. package/dist/worker.transport-mKXgNK0L.d.ts.map +1 -0
  154. package/package.json +23 -18
  155. package/dist/index-CwFww7VC.d.ts.map +0 -1
  156. package/dist/index-DnyeaoZU.d.mts.map +0 -1
  157. package/dist/logitron-logger.module-BCq3sF27.d.mts.map +0 -1
  158. package/dist/logitron-logger.module-BIGTm2V6.mjs.map +0 -1
  159. package/dist/logitron-logger.module-BTxDpK6u.js.map +0 -1
  160. package/dist/logitron-logger.module-BmT-ewin.d.ts.map +0 -1
  161. package/dist/search-Cg_OasF-.d.ts +0 -1
  162. package/dist/search-DN676Dnz.d.mts +0 -1
  163. package/dist/search-DOvSI-mb.mjs +0 -1
  164. package/dist/search-DoZF3RZj.js +0 -0
  165. package/dist/transport.manager-DETpXuaY.mjs.map +0 -1
  166. package/dist/transport.manager-ciG4r5uz.js.map +0 -1
@@ -0,0 +1,816 @@
1
+ import { h as LogEntry } from "./index-C1X-TE5I.js";
2
+
3
+ //#region src/search/types/search.types.d.ts
4
+
5
+ /**
6
+ * Search filter options
7
+ */
8
+ interface SearchFilters {
9
+ levels?: string[];
10
+ services?: string[];
11
+ traceIds?: string[];
12
+ timeRange?: TimeRange;
13
+ userIds?: string[];
14
+ sessionIds?: string[];
15
+ contexts?: string[];
16
+ excludePatterns?: string[];
17
+ minSeverity?: number;
18
+ hasError?: boolean;
19
+ customFields?: Record<string, unknown>;
20
+ }
21
+ /**
22
+ * Time range for filtering logs
23
+ */
24
+ interface TimeRange {
25
+ start: Date | number;
26
+ end?: Date | number;
27
+ relative?: RelativeTime;
28
+ }
29
+ /**
30
+ * Relative time specification
31
+ */
32
+ interface RelativeTime {
33
+ value: number;
34
+ unit: 'seconds' | 'minutes' | 'hours' | 'days';
35
+ }
36
+ /**
37
+ * Search result with metadata
38
+ */
39
+ interface SearchResult {
40
+ log: LogEntry;
41
+ score: number;
42
+ highlights?: SearchHighlight[];
43
+ matches?: SearchMatch[];
44
+ context?: LogEntry[];
45
+ relatedLogs?: RelatedLog[];
46
+ }
47
+ /**
48
+ * Search highlight information
49
+ */
50
+ interface SearchHighlight {
51
+ field: string;
52
+ fragments: string[];
53
+ matchedTerms: string[];
54
+ }
55
+ /**
56
+ * Search match details
57
+ */
58
+ interface SearchMatch {
59
+ field: string;
60
+ value: string;
61
+ position: number;
62
+ length: number;
63
+ }
64
+ /**
65
+ * Related log entry
66
+ */
67
+ interface RelatedLog {
68
+ log: LogEntry;
69
+ relationship: RelationshipType;
70
+ score: number;
71
+ }
72
+ /**
73
+ * Type of relationship between logs
74
+ */
75
+ type RelationshipType = 'same_trace' | 'same_user' | 'same_session' | 'temporal_proximity' | 'error_cascade' | 'similar_pattern';
76
+ /**
77
+ * Correlated logs grouped by trace ID or other criteria
78
+ */
79
+ interface CorrelatedLogs {
80
+ traceId?: string;
81
+ correlationKey: string;
82
+ logs: LogEntry[];
83
+ timeline: TimelineEvent[];
84
+ summary?: LogCorrelationSummary;
85
+ }
86
+ /**
87
+ * Timeline event for correlated logs
88
+ */
89
+ interface TimelineEvent {
90
+ timestamp: Date;
91
+ log: LogEntry;
92
+ eventType: 'start' | 'end' | 'error' | 'milestone' | 'info';
93
+ duration?: number;
94
+ }
95
+ /**
96
+ * Summary of correlated logs
97
+ */
98
+ interface LogCorrelationSummary {
99
+ totalLogs: number;
100
+ errorCount: number;
101
+ warningCount: number;
102
+ duration?: number;
103
+ services: string[];
104
+ criticalPath?: LogEntry[];
105
+ }
106
+ /**
107
+ * Similar log entry
108
+ */
109
+ interface SimilarLog {
110
+ log: LogEntry;
111
+ similarity: number;
112
+ matchedPatterns: string[];
113
+ reason: string;
114
+ }
115
+ /**
116
+ * Search query with metadata
117
+ */
118
+ interface SearchQuery {
119
+ query: string;
120
+ filters?: SearchFilters;
121
+ options?: SearchOptions;
122
+ timestamp: Date;
123
+ userId?: string;
124
+ }
125
+ /**
126
+ * Search options
127
+ */
128
+ interface SearchOptions {
129
+ limit?: number;
130
+ offset?: number;
131
+ sortBy?: SortField;
132
+ sortOrder?: 'asc' | 'desc';
133
+ includeContext?: boolean;
134
+ contextSize?: number;
135
+ highlightMatches?: boolean;
136
+ findSimilar?: boolean;
137
+ correlate?: boolean;
138
+ semanticSearch?: boolean;
139
+ }
140
+ /**
141
+ * Sort field options
142
+ */
143
+ type SortField = 'timestamp' | 'level' | 'score' | 'relevance';
144
+ /**
145
+ * Search suggestion
146
+ */
147
+ interface SearchSuggestion {
148
+ text: string;
149
+ type: SuggestionType;
150
+ category?: string;
151
+ frequency?: number;
152
+ lastUsed?: Date;
153
+ }
154
+ /**
155
+ * Suggestion type
156
+ */
157
+ type SuggestionType = 'field' | 'value' | 'operator' | 'query_history' | 'pattern' | 'filter';
158
+ /**
159
+ * Search statistics
160
+ */
161
+ interface SearchStats {
162
+ totalResults: number;
163
+ executionTime: number;
164
+ indexSize: number;
165
+ cacheHitRate?: number;
166
+ topTerms?: string[];
167
+ }
168
+ /**
169
+ * Semantic index for intelligent search
170
+ */
171
+ interface SemanticIndex {
172
+ version: string;
173
+ indexedCount: number;
174
+ lastUpdated: Date;
175
+ embeddings?: Map<string, number[]>;
176
+ clusters?: LogCluster[];
177
+ }
178
+ /**
179
+ * Log cluster for grouping similar logs
180
+ */
181
+ interface LogCluster {
182
+ id: string;
183
+ centroid: number[];
184
+ logs: LogEntry[];
185
+ pattern: string;
186
+ frequency: number;
187
+ labels?: string[];
188
+ }
189
+ /**
190
+ * Log pattern for pattern recognition
191
+ */
192
+ interface LogPattern {
193
+ id: string;
194
+ pattern: string;
195
+ regex?: RegExp;
196
+ examples: LogEntry[];
197
+ frequency: number;
198
+ lastSeen: Date;
199
+ category?: string;
200
+ severity?: string;
201
+ }
202
+ /**
203
+ * Anomaly detection result
204
+ */
205
+ interface AnomalyDetection {
206
+ log: LogEntry;
207
+ anomalyScore: number;
208
+ reason: string;
209
+ expectedPattern?: string;
210
+ deviations: string[];
211
+ }
212
+ /**
213
+ * Natural language query parsed result
214
+ */
215
+ interface ParsedNLQuery {
216
+ originalQuery: string;
217
+ intent: QueryIntent;
218
+ entities: QueryEntity[];
219
+ filters: SearchFilters;
220
+ timeRange?: TimeRange;
221
+ confidence: number;
222
+ }
223
+ /**
224
+ * Query intent
225
+ */
226
+ type QueryIntent = 'find_errors' | 'trace_request' | 'find_user_activity' | 'performance_analysis' | 'find_similar' | 'time_range_query' | 'correlation' | 'general_search';
227
+ /**
228
+ * Query entity extracted from natural language
229
+ */
230
+ interface QueryEntity {
231
+ type: EntityType;
232
+ value: string;
233
+ field?: string;
234
+ confidence: number;
235
+ }
236
+ /**
237
+ * Entity type
238
+ */
239
+ type EntityType = 'level' | 'service' | 'user_id' | 'trace_id' | 'time' | 'error_type' | 'field_value';
240
+ /**
241
+ * Search preset for saving common searches
242
+ */
243
+ interface SearchPreset {
244
+ id: string;
245
+ name: string;
246
+ description?: string;
247
+ query: string;
248
+ filters: SearchFilters;
249
+ options: SearchOptions;
250
+ createdAt: Date;
251
+ updatedAt: Date;
252
+ userId?: string;
253
+ shared?: boolean;
254
+ }
255
+ /**
256
+ * Export options for search results
257
+ */
258
+ interface ExportOptions {
259
+ format: 'json' | 'csv' | 'text';
260
+ includeMetadata?: boolean;
261
+ filename?: string;
262
+ fields?: string[];
263
+ }
264
+ //#endregion
265
+ //#region src/search/search-manager.d.ts
266
+ /**
267
+ * Configuration for search manager
268
+ */
269
+ interface SearchManagerConfig {
270
+ enableNLP?: boolean;
271
+ enablePatternRecognition?: boolean;
272
+ enableCorrelation?: boolean;
273
+ maxIndexSize?: number;
274
+ autoOptimize?: boolean;
275
+ }
276
+ /**
277
+ * Main search manager class
278
+ */
279
+ declare class SearchManager {
280
+ private searchEngine;
281
+ private indexer;
282
+ private patternEngine?;
283
+ private correlationEngine?;
284
+ private config;
285
+ constructor(config?: SearchManagerConfig);
286
+ /**
287
+ * Index new logs
288
+ */
289
+ indexLogs(logs: LogEntry[]): Promise<void>;
290
+ /**
291
+ * Add a single log to the index
292
+ */
293
+ indexLog(log: LogEntry): Promise<void>;
294
+ /**
295
+ * Perform a search
296
+ */
297
+ search(query: string, filters?: SearchFilters, options?: SearchOptions): Promise<SearchResult[]>;
298
+ /**
299
+ * Perform a natural language search
300
+ */
301
+ naturalLanguageSearch(query: string): Promise<SearchResult[]>;
302
+ /**
303
+ * Find logs correlated by trace ID
304
+ */
305
+ correlateByTraceId(traceId: string): Promise<CorrelatedLogs>;
306
+ /**
307
+ * Find similar logs
308
+ */
309
+ findSimilarLogs(logEntry: LogEntry, limit?: number): Promise<SimilarLog[]>;
310
+ /**
311
+ * Find logs related to a given log
312
+ */
313
+ findRelatedLogs(log: LogEntry, limit?: number): Promise<RelatedLog[]>;
314
+ /**
315
+ * Get search suggestions
316
+ */
317
+ getSuggestions(partialQuery: string, limit?: number): Promise<SearchSuggestion[]>;
318
+ /**
319
+ * Get search statistics
320
+ */
321
+ getStats(): Promise<SearchStats>;
322
+ /**
323
+ * Parse natural language query
324
+ */
325
+ parseNaturalLanguageQuery(query: string): Promise<ParsedNLQuery>;
326
+ /**
327
+ * Save a search preset
328
+ */
329
+ savePreset(preset: Omit<SearchPreset, 'id' | 'createdAt' | 'updatedAt'>): Promise<SearchPreset>;
330
+ /**
331
+ * Get saved presets
332
+ */
333
+ getPresets(userId?: string): Promise<SearchPreset[]>;
334
+ /**
335
+ * Delete a preset
336
+ */
337
+ deletePreset(presetId: string): Promise<void>;
338
+ /**
339
+ * Detect log patterns
340
+ */
341
+ detectPatterns(): Promise<LogPattern[]>;
342
+ /**
343
+ * Get detected patterns
344
+ */
345
+ getPatterns(): LogPattern[];
346
+ /**
347
+ * Detect anomalies in logs
348
+ */
349
+ detectAnomalies(): Promise<AnomalyDetection[]>;
350
+ /**
351
+ * Correlate logs by multiple criteria
352
+ */
353
+ correlateByMultipleCriteria(criteria: {
354
+ traceId?: boolean;
355
+ userId?: boolean;
356
+ sessionId?: boolean;
357
+ temporal?: boolean;
358
+ errorCascade?: boolean;
359
+ }): Promise<Map<string, CorrelatedLogs>>;
360
+ /**
361
+ * Analyze error cascades
362
+ */
363
+ analyzeErrorCascade(traceId: string): Promise<{
364
+ rootCause?: LogEntry;
365
+ cascade: LogEntry[];
366
+ impactedServices: string[];
367
+ }>;
368
+ /**
369
+ * Export search results
370
+ */
371
+ exportResults(results: SearchResult[], options: ExportOptions): Promise<string>;
372
+ /**
373
+ * Clear all indexed data
374
+ */
375
+ clearIndex(): Promise<void>;
376
+ /**
377
+ * Optimize the index
378
+ */
379
+ optimizeIndex(): Promise<void>;
380
+ /**
381
+ * Get index statistics
382
+ */
383
+ getIndexStats(): Promise<{
384
+ totalDocuments: number;
385
+ indexSize: number;
386
+ lastOptimized?: Date;
387
+ }>;
388
+ /**
389
+ * Remove old logs
390
+ */
391
+ removeOldLogs(olderThan: Date): Promise<number>;
392
+ private exportAsJSON;
393
+ private exportAsCSV;
394
+ private exportAsText;
395
+ private filterFields;
396
+ private getNestedValue;
397
+ private escapeCSVValue;
398
+ }
399
+ //#endregion
400
+ //#region src/search/core/log-indexer.interface.d.ts
401
+ /**
402
+ * Log indexer interface
403
+ */
404
+ interface ILogIndexer {
405
+ /**
406
+ * Index a single log entry
407
+ * @param log - Log entry to index
408
+ */
409
+ indexLog(log: LogEntry): Promise<void>;
410
+ /**
411
+ * Index multiple log entries in batch
412
+ * @param logs - Array of log entries to index
413
+ */
414
+ indexBatch(logs: LogEntry[]): Promise<void>;
415
+ /**
416
+ * Build semantic index for intelligent search
417
+ * @param logs - Array of log entries to build index from
418
+ * @returns Semantic index
419
+ */
420
+ buildSemanticIndex(logs: LogEntry[]): Promise<SemanticIndex>;
421
+ /**
422
+ * Update search suggestions based on search history
423
+ * @param searchHistory - Array of past search queries
424
+ */
425
+ updateSearchSuggestions(searchHistory: SearchQuery[]): Promise<void>;
426
+ /**
427
+ * Optimize the index for better performance
428
+ */
429
+ optimizeIndex(): Promise<void>;
430
+ /**
431
+ * Clear the index
432
+ */
433
+ clearIndex(): Promise<void>;
434
+ /**
435
+ * Get index statistics
436
+ * @returns Index statistics
437
+ */
438
+ getIndexStats(): Promise<{
439
+ totalDocuments: number;
440
+ indexSize: number;
441
+ lastOptimized?: Date;
442
+ }>;
443
+ /**
444
+ * Remove logs older than specified time
445
+ * @param olderThan - Remove logs older than this date
446
+ * @returns Number of logs removed
447
+ */
448
+ removeOldLogs(olderThan: Date): Promise<number>;
449
+ }
450
+ //#endregion
451
+ //#region src/search/core/basic-log-indexer.d.ts
452
+ /**
453
+ * Basic log indexer implementation
454
+ */
455
+ declare class BasicLogIndexer implements ILogIndexer {
456
+ private options?;
457
+ private index;
458
+ private fieldIndices;
459
+ private semanticIndex;
460
+ private lastOptimized?;
461
+ /**
462
+ * Running estimate of the serialized index size in bytes, maintained
463
+ * incrementally. The previous implementation JSON.stringify'd EVERY log on
464
+ * each getIndexStats() call — O(n) per call, which for the default 1M-entry
465
+ * cap means stringifying a million objects and blocking the event loop.
466
+ * We keep a per-log byte estimate so the lookup is O(1).
467
+ */
468
+ private indexSizeBytes;
469
+ private readonly logSizeById;
470
+ constructor(options?: {
471
+ maxIndexSize?: number;
472
+ autoOptimize?: boolean;
473
+ optimizeThreshold?: number;
474
+ } | undefined);
475
+ /**
476
+ * Index a single log entry
477
+ */
478
+ indexLog(log: LogEntry): Promise<void>;
479
+ /**
480
+ * Index multiple log entries in batch
481
+ */
482
+ indexBatch(logs: LogEntry[]): Promise<void>;
483
+ /**
484
+ * Build semantic index for intelligent search
485
+ */
486
+ buildSemanticIndex(logs: LogEntry[]): Promise<SemanticIndex>;
487
+ /**
488
+ * Update search suggestions based on search history
489
+ */
490
+ updateSearchSuggestions(searchHistory: SearchQuery[]): Promise<void>;
491
+ /**
492
+ * Optimize the index for better performance
493
+ */
494
+ optimizeIndex(): Promise<void>;
495
+ /**
496
+ * Clear the index
497
+ */
498
+ clearIndex(): Promise<void>;
499
+ /**
500
+ * Get index statistics
501
+ */
502
+ getIndexStats(): Promise<{
503
+ totalDocuments: number;
504
+ indexSize: number;
505
+ lastOptimized?: Date;
506
+ }>;
507
+ /**
508
+ * Remove logs older than specified time
509
+ */
510
+ removeOldLogs(olderThan: Date): Promise<number>;
511
+ /**
512
+ * Search logs by field
513
+ */
514
+ searchByField(field: string, value: string): LogEntry[];
515
+ /**
516
+ * Get all indexed logs
517
+ */
518
+ getAllLogs(): LogEntry[];
519
+ private initializeFieldIndices;
520
+ private updateFieldIndices;
521
+ private addToFieldIndex;
522
+ private removeFromFieldIndices;
523
+ private generateLogId;
524
+ private calculateIndexSize;
525
+ /** Insert into the main index and update the running size estimate. */
526
+ private trackInsert;
527
+ /** Delete from the main index and update the running size estimate. */
528
+ private trackDelete;
529
+ private removeOldestLogs;
530
+ private clusterLogs;
531
+ }
532
+ //#endregion
533
+ //#region src/search/core/search-engine.interface.d.ts
534
+ /**
535
+ * Main search engine interface
536
+ */
537
+ interface ILogSearchEngine {
538
+ /**
539
+ * Perform a full-text search across logs
540
+ * @param query - Search query string
541
+ * @param filters - Optional filters to narrow down results
542
+ * @param options - Search options
543
+ * @returns Array of search results
544
+ */
545
+ search(query: string, filters?: SearchFilters, options?: SearchOptions): Promise<SearchResult[]>;
546
+ /**
547
+ * Perform a natural language search
548
+ * @param query - Natural language query
549
+ * @returns Array of search results
550
+ */
551
+ naturalLanguageSearch(query: string): Promise<SearchResult[]>;
552
+ /**
553
+ * Find logs correlated by trace ID
554
+ * @param traceId - Trace ID to correlate logs
555
+ * @returns Correlated logs
556
+ */
557
+ correlateByTraceId(traceId: string): Promise<CorrelatedLogs>;
558
+ /**
559
+ * Find logs similar to a given log entry
560
+ * @param logEntry - Log entry to find similar logs for
561
+ * @param limit - Maximum number of similar logs to return
562
+ * @returns Array of similar logs
563
+ */
564
+ findSimilarLogs(logEntry: LogEntry, limit?: number): Promise<SimilarLog[]>;
565
+ /**
566
+ * Get search suggestions based on partial query
567
+ * @param partialQuery - Partial query string
568
+ * @param limit - Maximum number of suggestions
569
+ * @returns Array of suggestions
570
+ */
571
+ getSuggestions(partialQuery: string, limit?: number): Promise<SearchSuggestion[]>;
572
+ /**
573
+ * Get search statistics
574
+ * @returns Search statistics
575
+ */
576
+ getStats(): Promise<SearchStats>;
577
+ /**
578
+ * Parse natural language query
579
+ * @param query - Natural language query
580
+ * @returns Parsed query with intent and entities
581
+ */
582
+ parseNaturalLanguageQuery(query: string): Promise<ParsedNLQuery>;
583
+ /**
584
+ * Save a search preset
585
+ * @param preset - Search preset to save
586
+ * @returns Saved preset with ID
587
+ */
588
+ savePreset(preset: Omit<SearchPreset, 'id' | 'createdAt' | 'updatedAt'>): Promise<SearchPreset>;
589
+ /**
590
+ * Get saved presets
591
+ * @param userId - Optional user ID to filter presets
592
+ * @returns Array of presets
593
+ */
594
+ getPresets(userId?: string): Promise<SearchPreset[]>;
595
+ /**
596
+ * Delete a preset
597
+ * @param presetId - ID of preset to delete
598
+ */
599
+ deletePreset(presetId: string): Promise<void>;
600
+ }
601
+ //#endregion
602
+ //#region src/search/core/basic-search-engine.d.ts
603
+ /**
604
+ * Basic search engine implementation
605
+ */
606
+ declare class BasicSearchEngine implements ILogSearchEngine {
607
+ private options?;
608
+ private logs;
609
+ private presets;
610
+ private searchHistory;
611
+ private suggestionCache;
612
+ constructor(options?: {
613
+ maxHistorySize?: number;
614
+ cacheSize?: number;
615
+ maxLogs?: number;
616
+ } | undefined);
617
+ /**
618
+ * Add logs to the search index.
619
+ *
620
+ * Bounded to `maxLogs` (default 100k): the buffer previously grew without
621
+ * limit, leaking memory in any long-running process feeding it logs. When the
622
+ * cap is exceeded the oldest entries are dropped (FIFO). We also append with a
623
+ * loop rather than `push(...logs)` to avoid a RangeError from spreading a very
624
+ * large array onto the call stack.
625
+ */
626
+ addLogs(logs: LogEntry[]): void;
627
+ /**
628
+ * Clear all logs from the index
629
+ */
630
+ clearLogs(): void;
631
+ /**
632
+ * Get all indexed logs
633
+ */
634
+ getLogs(): LogEntry[];
635
+ /**
636
+ * Perform a full-text search across logs
637
+ */
638
+ search(query: string, filters?: SearchFilters, options?: SearchOptions): Promise<SearchResult[]>;
639
+ /**
640
+ * Natural language search (basic implementation)
641
+ */
642
+ naturalLanguageSearch(query: string): Promise<SearchResult[]>;
643
+ /**
644
+ * Find logs correlated by trace ID
645
+ */
646
+ correlateByTraceId(traceId: string): Promise<CorrelatedLogs>;
647
+ /**
648
+ * Find similar logs based on content similarity
649
+ */
650
+ findSimilarLogs(logEntry: LogEntry, limit?: number): Promise<SimilarLog[]>;
651
+ /**
652
+ * Get search suggestions
653
+ */
654
+ getSuggestions(partialQuery: string, limit?: number): Promise<SearchSuggestion[]>;
655
+ /**
656
+ * Get search statistics
657
+ */
658
+ getStats(): Promise<SearchStats>;
659
+ /**
660
+ * Parse natural language query
661
+ */
662
+ parseNaturalLanguageQuery(query: string): Promise<ParsedNLQuery>;
663
+ /**
664
+ * Save a search preset
665
+ */
666
+ savePreset(preset: Omit<SearchPreset, 'id' | 'createdAt' | 'updatedAt'>): Promise<SearchPreset>;
667
+ /**
668
+ * Get saved presets
669
+ */
670
+ getPresets(userId?: string): Promise<SearchPreset[]>;
671
+ /**
672
+ * Delete a preset
673
+ */
674
+ deletePreset(presetId: string): Promise<void>;
675
+ private applyFilters;
676
+ private performTextSearch;
677
+ private getSearchableText;
678
+ private getHighlightFragments;
679
+ private applySorting;
680
+ private applyPagination;
681
+ private enrichWithContext;
682
+ private calculateSimilarity;
683
+ private calculateTextSimilarity;
684
+ private findMatchedPatterns;
685
+ private generateSimilarityReason;
686
+ private extractTimeRange;
687
+ private addToSearchHistory;
688
+ private getTopTerms;
689
+ private generateId;
690
+ }
691
+ //#endregion
692
+ //#region src/search/engines/correlation-engine.d.ts
693
+ /**
694
+ * Correlation engine for log analysis
695
+ */
696
+ declare class CorrelationEngine {
697
+ private options?;
698
+ constructor(options?: {
699
+ maxCorrelationDistance?: number;
700
+ temporalWindowMs?: number;
701
+ minSimilarityScore?: number;
702
+ } | undefined);
703
+ /**
704
+ * Find logs related to a given log entry
705
+ */
706
+ findRelatedLogs(log: LogEntry, allLogs: LogEntry[], limit?: number): Promise<RelatedLog[]>;
707
+ /**
708
+ * Correlate logs by multiple criteria
709
+ */
710
+ correlateByMultipleCriteria(logs: LogEntry[], criteria: {
711
+ traceId?: boolean;
712
+ userId?: boolean;
713
+ sessionId?: boolean;
714
+ temporal?: boolean;
715
+ errorCascade?: boolean;
716
+ }): Promise<Map<string, CorrelatedLogs>>;
717
+ /**
718
+ * Build a timeline from correlated logs
719
+ */
720
+ buildTimeline(logs: LogEntry[]): TimelineEvent[];
721
+ /**
722
+ * Analyze error cascades
723
+ */
724
+ analyzeErrorCascade(logs: LogEntry[]): Promise<{
725
+ rootCause?: LogEntry;
726
+ cascade: LogEntry[];
727
+ impactedServices: string[];
728
+ }>;
729
+ private correlateByTraceId;
730
+ private correlateByUserId;
731
+ private correlateBySessionId;
732
+ private correlateByTemporalProximity;
733
+ private correlateErrorCascades;
734
+ private buildErrorCascade;
735
+ private findRelationships;
736
+ private calculateRelationshipScore;
737
+ private haveSimilarPattern;
738
+ private normalizeMessage;
739
+ private determineEventType;
740
+ private deduplicateRelatedLogs;
741
+ private convertToCorrelatedLogs;
742
+ private generateSummary;
743
+ }
744
+ //#endregion
745
+ //#region src/search/engines/nlp-search-engine.d.ts
746
+ /**
747
+ * NLP-enhanced search engine
748
+ */
749
+ declare class NLPSearchEngine extends BasicSearchEngine {
750
+ private intentPatterns;
751
+ private entityPatterns;
752
+ constructor(options?: Record<string, unknown>);
753
+ /**
754
+ * Enhanced natural language query parsing
755
+ */
756
+ parseNaturalLanguageQuery(query: string): Promise<ParsedNLQuery>;
757
+ /**
758
+ * Enhanced natural language search
759
+ */
760
+ naturalLanguageSearch(query: string): Promise<SearchResult[]>;
761
+ private initializePatterns;
762
+ private detectIntent;
763
+ private extractEntities;
764
+ private applyEntityToFilter;
765
+ private extractAdvancedTimeRange;
766
+ private calculateConfidence;
767
+ private getOptionsForIntent;
768
+ private extractCleanQuery;
769
+ }
770
+ //#endregion
771
+ //#region src/search/engines/pattern-recognition-engine.d.ts
772
+ /**
773
+ * Pattern recognition engine for log analysis
774
+ */
775
+ declare class PatternRecognitionEngine {
776
+ private options?;
777
+ private patterns;
778
+ private patternFrequencies;
779
+ constructor(options?: {
780
+ minFrequency?: number;
781
+ maxPatterns?: number;
782
+ anomalyThreshold?: number;
783
+ } | undefined);
784
+ /**
785
+ * Analyze logs and detect patterns
786
+ */
787
+ analyzePatterns(logs: LogEntry[]): Promise<LogPattern[]>;
788
+ /**
789
+ * Detect anomalies in logs
790
+ */
791
+ detectAnomalies(logs: LogEntry[]): Promise<AnomalyDetection[]>;
792
+ /**
793
+ * Find patterns matching a log entry
794
+ */
795
+ findMatchingPatterns(log: LogEntry): LogPattern[];
796
+ /**
797
+ * Get all detected patterns
798
+ */
799
+ getPatterns(): LogPattern[];
800
+ /**
801
+ * Get pattern by ID
802
+ */
803
+ getPattern(patternId: string): LogPattern | undefined;
804
+ private extractMessagePatterns;
805
+ private extractErrorPatterns;
806
+ private extractTimingPatterns;
807
+ private normalizeMessage;
808
+ private extractErrorPattern;
809
+ private calculateAnomalyScore;
810
+ private generateAnomalyReason;
811
+ private findDeviations;
812
+ private doesLogMatchPattern;
813
+ }
814
+ //#endregion
815
+ export { SearchStats as A, SearchFilters as C, SearchPreset as D, SearchOptions as E, SuggestionType as F, TimeRange as I, TimelineEvent as L, SemanticIndex as M, SimilarLog as N, SearchQuery as O, SortField as P, RelativeTime as S, SearchMatch as T, ParsedNLQuery as _, ILogSearchEngine as a, RelatedLog as b, SearchManager as c, CorrelatedLogs as d, EntityType as f, LogPattern as g, LogCorrelationSummary as h, BasicSearchEngine as i, SearchSuggestion as j, SearchResult as k, SearchManagerConfig as l, LogCluster as m, NLPSearchEngine as n, BasicLogIndexer as o, ExportOptions as p, CorrelationEngine as r, ILogIndexer as s, PatternRecognitionEngine as t, AnomalyDetection as u, QueryEntity as v, SearchHighlight as w, RelationshipType as x, QueryIntent as y };
816
+ //# sourceMappingURL=search-DujhR94O.d.ts.map