mcp-adr-analysis-server 2.0.21 → 2.0.24
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/dist/.tsbuildinfo +1 -1
- package/dist/src/index.d.ts +9 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +1380 -781
- package/dist/src/index.js.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.d.ts.map +1 -1
- package/dist/src/tools/adr-suggestion-tool.js +32 -30
- package/dist/src/tools/adr-suggestion-tool.js.map +1 -1
- package/dist/src/tools/content-masking-tool.d.ts +4 -0
- package/dist/src/tools/content-masking-tool.d.ts.map +1 -1
- package/dist/src/tools/content-masking-tool.js +531 -28
- package/dist/src/tools/content-masking-tool.js.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.d.ts +8 -5
- package/dist/src/tools/deployment-readiness-tool.d.ts.map +1 -1
- package/dist/src/tools/deployment-readiness-tool.js +741 -79
- package/dist/src/tools/deployment-readiness-tool.js.map +1 -1
- package/dist/src/tools/environment-analysis-tool.d.ts +4 -0
- package/dist/src/tools/environment-analysis-tool.d.ts.map +1 -1
- package/dist/src/tools/environment-analysis-tool.js +568 -24
- package/dist/src/tools/environment-analysis-tool.js.map +1 -1
- package/dist/src/tools/mcp-planning-tool.d.ts.map +1 -1
- package/dist/src/tools/mcp-planning-tool.js +298 -173
- package/dist/src/tools/mcp-planning-tool.js.map +1 -1
- package/dist/src/tools/memory-loading-tool.d.ts +60 -0
- package/dist/src/tools/memory-loading-tool.d.ts.map +1 -0
- package/dist/src/tools/memory-loading-tool.js +457 -0
- package/dist/src/tools/memory-loading-tool.js.map +1 -0
- package/dist/src/tools/smart-git-push-tool.d.ts +3 -0
- package/dist/src/tools/smart-git-push-tool.d.ts.map +1 -1
- package/dist/src/tools/smart-git-push-tool.js +177 -223
- package/dist/src/tools/smart-git-push-tool.js.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts +20 -11
- package/dist/src/tools/troubleshoot-guided-workflow-tool.d.ts.map +1 -1
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js +506 -22
- package/dist/src/tools/troubleshoot-guided-workflow-tool.js.map +1 -1
- package/dist/src/types/enhanced-errors.d.ts +173 -0
- package/dist/src/types/enhanced-errors.d.ts.map +1 -0
- package/dist/src/types/enhanced-errors.js +668 -0
- package/dist/src/types/enhanced-errors.js.map +1 -0
- package/dist/src/types/knowledge-graph-schemas.d.ts +92 -0
- package/dist/src/types/knowledge-graph-schemas.d.ts.map +1 -1
- package/dist/src/types/knowledge-graph-schemas.js +45 -17
- package/dist/src/types/knowledge-graph-schemas.js.map +1 -1
- package/dist/src/types/memory-entities.d.ts +7209 -0
- package/dist/src/types/memory-entities.d.ts.map +1 -0
- package/dist/src/types/memory-entities.js +395 -0
- package/dist/src/types/memory-entities.js.map +1 -0
- package/dist/src/types/todo-json-schemas.d.ts +7 -653
- package/dist/src/types/todo-json-schemas.d.ts.map +1 -1
- package/dist/src/types/todo-json-schemas.js +6 -110
- package/dist/src/types/todo-json-schemas.js.map +1 -1
- package/dist/src/utils/enhanced-logging.d.ts +195 -0
- package/dist/src/utils/enhanced-logging.d.ts.map +1 -0
- package/dist/src/utils/enhanced-logging.js +449 -0
- package/dist/src/utils/enhanced-logging.js.map +1 -0
- package/dist/src/utils/interactive-approval.d.ts +1 -1
- package/dist/src/utils/interactive-approval.d.ts.map +1 -1
- package/dist/src/utils/interactive-approval.js +20 -16
- package/dist/src/utils/interactive-approval.js.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts +23 -1
- package/dist/src/utils/knowledge-graph-manager.d.ts.map +1 -1
- package/dist/src/utils/knowledge-graph-manager.js +297 -69
- package/dist/src/utils/knowledge-graph-manager.js.map +1 -1
- package/dist/src/utils/memory-entity-manager.d.ts +134 -0
- package/dist/src/utils/memory-entity-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-entity-manager.js +848 -0
- package/dist/src/utils/memory-entity-manager.js.map +1 -0
- package/dist/src/utils/memory-health-scoring.d.ts +125 -0
- package/dist/src/utils/memory-health-scoring.d.ts.map +1 -0
- package/dist/src/utils/memory-health-scoring.js +277 -0
- package/dist/src/utils/memory-health-scoring.js.map +1 -0
- package/dist/src/utils/memory-migration-manager.d.ts +93 -0
- package/dist/src/utils/memory-migration-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-migration-manager.js +834 -0
- package/dist/src/utils/memory-migration-manager.js.map +1 -0
- package/dist/src/utils/memory-relationship-mapper.d.ts +87 -0
- package/dist/src/utils/memory-relationship-mapper.d.ts.map +1 -0
- package/dist/src/utils/memory-relationship-mapper.js +481 -0
- package/dist/src/utils/memory-relationship-mapper.js.map +1 -0
- package/dist/src/utils/memory-rollback-manager.d.ts +93 -0
- package/dist/src/utils/memory-rollback-manager.d.ts.map +1 -0
- package/dist/src/utils/memory-rollback-manager.js +542 -0
- package/dist/src/utils/memory-rollback-manager.js.map +1 -0
- package/dist/src/utils/memory-transformation.d.ts +59 -0
- package/dist/src/utils/memory-transformation.d.ts.map +1 -0
- package/dist/src/utils/memory-transformation.js +742 -0
- package/dist/src/utils/memory-transformation.js.map +1 -0
- package/dist/src/utils/prompt-execution.d.ts.map +1 -1
- package/dist/src/utils/prompt-execution.js +72 -51
- package/dist/src/utils/prompt-execution.js.map +1 -1
- package/dist/src/utils/todo-file-watcher.d.ts +11 -23
- package/dist/src/utils/todo-file-watcher.d.ts.map +1 -1
- package/dist/src/utils/todo-file-watcher.js +18 -156
- package/dist/src/utils/todo-file-watcher.js.map +1 -1
- package/package.json +22 -6
- package/dist/src/tools/smart-score-tool.d.ts +0 -173
- package/dist/src/tools/smart-score-tool.d.ts.map +0 -1
- package/dist/src/tools/smart-score-tool.js +0 -681
- package/dist/src/tools/smart-score-tool.js.map +0 -1
- package/dist/src/tools/todo-management-tool-v2.d.ts +0 -368
- package/dist/src/tools/todo-management-tool-v2.d.ts.map +0 -1
- package/dist/src/tools/todo-management-tool-v2.js +0 -922
- package/dist/src/tools/todo-management-tool-v2.js.map +0 -1
- package/dist/src/utils/project-health-scoring.d.ts +0 -177
- package/dist/src/utils/project-health-scoring.d.ts.map +0 -1
- package/dist/src/utils/project-health-scoring.js +0 -370
- package/dist/src/utils/project-health-scoring.js.map +0 -1
- package/dist/src/utils/todo-json-manager.d.ts +0 -71
- package/dist/src/utils/todo-json-manager.d.ts.map +0 -1
- package/dist/src/utils/todo-json-manager.js +0 -396
- package/dist/src/utils/todo-json-manager.js.map +0 -1
- package/dist/src/utils/todo-markdown-converter.d.ts +0 -16
- package/dist/src/utils/todo-markdown-converter.d.ts.map +0 -1
- package/dist/src/utils/todo-markdown-converter.js +0 -362
- package/dist/src/utils/todo-markdown-converter.js.map +0 -1
- package/dist/src/utils/todo-migration.d.ts +0 -47
- package/dist/src/utils/todo-migration.d.ts.map +0 -1
- package/dist/src/utils/todo-migration.js +0 -261
- package/dist/src/utils/todo-migration.js.map +0 -1
|
@@ -1,113 +1,9 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
1
|
/**
|
|
3
|
-
* JSON
|
|
4
|
-
*
|
|
5
|
-
* This replaces inconsistent markdown parsing with structured JSON storage
|
|
6
|
-
* that integrates seamlessly with the knowledge graph and scoring system.
|
|
2
|
+
* DEPRECATED: Todo JSON schemas removed in memory-centric transformation
|
|
3
|
+
* This is a stub file to prevent import errors
|
|
7
4
|
*/
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
status: z.enum(['pending', 'in_progress', 'completed', 'blocked', 'cancelled']),
|
|
13
|
-
priority: z.enum(['low', 'medium', 'high', 'critical']),
|
|
14
|
-
category: z.string().optional(),
|
|
15
|
-
assignee: z.string().optional(),
|
|
16
|
-
// Timestamps
|
|
17
|
-
createdAt: z.string(),
|
|
18
|
-
updatedAt: z.string(),
|
|
19
|
-
completedAt: z.string().optional(),
|
|
20
|
-
dueDate: z.string().optional(),
|
|
21
|
-
// Relationships
|
|
22
|
-
parentTaskId: z.string().optional(),
|
|
23
|
-
subtasks: z.array(z.string()).default([]),
|
|
24
|
-
dependencies: z.array(z.string()).default([]),
|
|
25
|
-
blockedBy: z.array(z.string()).default([]),
|
|
26
|
-
// ADR Integration
|
|
27
|
-
linkedAdrs: z.array(z.string()).default([]),
|
|
28
|
-
adrGeneratedTask: z.boolean().default(false),
|
|
29
|
-
// Knowledge Graph Integration
|
|
30
|
-
intentId: z.string().optional(),
|
|
31
|
-
toolExecutions: z.array(z.string()).default([]),
|
|
32
|
-
// Scoring Integration
|
|
33
|
-
scoreWeight: z.number().default(1), // How much this task impacts overall score
|
|
34
|
-
scoreCategory: z.enum(['task_completion', 'deployment_readiness', 'architecture_compliance', 'security_posture', 'code_quality']).default('task_completion'),
|
|
35
|
-
// Progress tracking
|
|
36
|
-
estimatedHours: z.number().optional(),
|
|
37
|
-
actualHours: z.number().optional(),
|
|
38
|
-
progressPercentage: z.number().default(0),
|
|
39
|
-
// Metadata
|
|
40
|
-
tags: z.array(z.string()).default([]),
|
|
41
|
-
notes: z.string().optional(),
|
|
42
|
-
lastModifiedBy: z.enum(['human', 'tool', 'adr_generator', 'knowledge_graph']).default('tool'),
|
|
43
|
-
// Automation
|
|
44
|
-
autoComplete: z.boolean().default(false), // Auto-complete when criteria met
|
|
45
|
-
completionCriteria: z.string().optional(), // JSON string of completion rules
|
|
46
|
-
// Version control
|
|
47
|
-
version: z.number().default(1),
|
|
48
|
-
changeLog: z.array(z.object({
|
|
49
|
-
timestamp: z.string(),
|
|
50
|
-
action: z.enum(['created', 'updated', 'completed', 'blocked', 'cancelled', 'moved']),
|
|
51
|
-
details: z.string(),
|
|
52
|
-
modifiedBy: z.string()
|
|
53
|
-
})).default([])
|
|
54
|
-
});
|
|
55
|
-
export const TodoSectionSchema = z.object({
|
|
56
|
-
id: z.string(),
|
|
57
|
-
title: z.string(),
|
|
58
|
-
description: z.string().optional(),
|
|
59
|
-
order: z.number(),
|
|
60
|
-
collapsed: z.boolean().default(false),
|
|
61
|
-
tasks: z.array(z.string()), // Task IDs
|
|
62
|
-
metadata: z.record(z.any()).optional()
|
|
63
|
-
});
|
|
64
|
-
export const TodoJsonDataSchema = z.object({
|
|
65
|
-
version: z.string().default('1.0.0'),
|
|
66
|
-
metadata: z.object({
|
|
67
|
-
projectName: z.string().optional(),
|
|
68
|
-
lastUpdated: z.string(),
|
|
69
|
-
totalTasks: z.number(),
|
|
70
|
-
completedTasks: z.number(),
|
|
71
|
-
lastSyncToMarkdown: z.string().optional(),
|
|
72
|
-
autoSyncEnabled: z.boolean().default(true),
|
|
73
|
-
lastGitPush: z.string().optional(),
|
|
74
|
-
lastPushFiles: z.array(z.string()).optional()
|
|
75
|
-
}),
|
|
76
|
-
// Task storage
|
|
77
|
-
tasks: z.record(TodoTaskSchema), // taskId -> Task
|
|
78
|
-
sections: z.array(TodoSectionSchema),
|
|
79
|
-
// Scoring integration
|
|
80
|
-
scoringSync: z.object({
|
|
81
|
-
lastScoreUpdate: z.string(),
|
|
82
|
-
taskCompletionScore: z.number(),
|
|
83
|
-
priorityWeightedScore: z.number(),
|
|
84
|
-
criticalTasksRemaining: z.number(),
|
|
85
|
-
scoreHistory: z.array(z.object({
|
|
86
|
-
timestamp: z.string(),
|
|
87
|
-
score: z.number(),
|
|
88
|
-
trigger: z.string()
|
|
89
|
-
})).default([])
|
|
90
|
-
}),
|
|
91
|
-
// Knowledge graph integration
|
|
92
|
-
knowledgeGraphSync: z.object({
|
|
93
|
-
lastSync: z.string(),
|
|
94
|
-
linkedIntents: z.array(z.string()),
|
|
95
|
-
pendingUpdates: z.array(z.object({
|
|
96
|
-
taskId: z.string(),
|
|
97
|
-
updateType: z.enum(['status', 'progress', 'completion']),
|
|
98
|
-
timestamp: z.string()
|
|
99
|
-
})).default([])
|
|
100
|
-
}),
|
|
101
|
-
// Automation rules
|
|
102
|
-
automationRules: z.array(z.object({
|
|
103
|
-
id: z.string(),
|
|
104
|
-
name: z.string(),
|
|
105
|
-
trigger: z.enum(['task_completed', 'all_dependencies_met', 'score_threshold', 'time_based']),
|
|
106
|
-
conditions: z.record(z.any()),
|
|
107
|
-
actions: z.array(z.object({
|
|
108
|
-
type: z.enum(['complete_task', 'create_task', 'update_status', 'notify', 'update_score']),
|
|
109
|
-
parameters: z.record(z.any())
|
|
110
|
-
}))
|
|
111
|
-
})).default([])
|
|
112
|
-
});
|
|
5
|
+
// Export empty stubs for compatibility
|
|
6
|
+
export const TODO_JSON_SCHEMA = {};
|
|
7
|
+
export const TASK_SCHEMA = {};
|
|
8
|
+
export const TODO_METADATA_SCHEMA = {};
|
|
113
9
|
//# sourceMappingURL=todo-json-schemas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"todo-json-schemas.js","sourceRoot":"","sources":["../../../src/types/todo-json-schemas.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"todo-json-schemas.js","sourceRoot":"","sources":["../../../src/types/todo-json-schemas.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH,uCAAuC;AACvC,MAAM,CAAC,MAAM,gBAAgB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,CAAC;AAC9B,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enhanced Logging System
|
|
3
|
+
*
|
|
4
|
+
* Provides comprehensive logging with structured error reporting,
|
|
5
|
+
* diagnostic context, and actionable error messages.
|
|
6
|
+
*/
|
|
7
|
+
import { EnhancedError, DiagnosticContext } from '../types/enhanced-errors.js';
|
|
8
|
+
export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'critical';
|
|
9
|
+
export interface LogEntry {
|
|
10
|
+
timestamp: Date;
|
|
11
|
+
level: LogLevel;
|
|
12
|
+
message: string;
|
|
13
|
+
component: string;
|
|
14
|
+
operation?: string;
|
|
15
|
+
context?: Record<string, any>;
|
|
16
|
+
error?: any;
|
|
17
|
+
diagnostics?: DiagnosticContext;
|
|
18
|
+
performanceMetrics?: {
|
|
19
|
+
memoryUsage?: number;
|
|
20
|
+
cpuUsage?: number;
|
|
21
|
+
duration?: number;
|
|
22
|
+
queueSize?: number;
|
|
23
|
+
activeOperations?: number;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface LoggerConfig {
|
|
27
|
+
level: LogLevel;
|
|
28
|
+
enableConsole: boolean;
|
|
29
|
+
enableFile: boolean;
|
|
30
|
+
filePath?: string;
|
|
31
|
+
maxFileSize?: number;
|
|
32
|
+
maxFiles?: number;
|
|
33
|
+
enableStructuredLogging: boolean;
|
|
34
|
+
enablePerformanceMetrics: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Enhanced Logger with comprehensive error reporting and diagnostics
|
|
38
|
+
*/
|
|
39
|
+
export declare class EnhancedLogger {
|
|
40
|
+
private config;
|
|
41
|
+
private logBuffer;
|
|
42
|
+
private maxBufferSize;
|
|
43
|
+
constructor(config?: Partial<LoggerConfig>);
|
|
44
|
+
/**
|
|
45
|
+
* Log debug information
|
|
46
|
+
*/
|
|
47
|
+
debug(message: string, component: string, context?: Record<string, any>): void;
|
|
48
|
+
/**
|
|
49
|
+
* Log informational messages
|
|
50
|
+
*/
|
|
51
|
+
info(message: string, component: string, context?: Record<string, any>): void;
|
|
52
|
+
/**
|
|
53
|
+
* Log warning messages
|
|
54
|
+
*/
|
|
55
|
+
warn(message: string, component: string, context?: Record<string, any>): void;
|
|
56
|
+
/**
|
|
57
|
+
* Log error messages
|
|
58
|
+
*/
|
|
59
|
+
error(message: string, component: string, error?: Error, context?: Record<string, any>): void;
|
|
60
|
+
/**
|
|
61
|
+
* Log critical errors
|
|
62
|
+
*/
|
|
63
|
+
critical(message: string, component: string, error?: Error, context?: Record<string, any>): void;
|
|
64
|
+
/**
|
|
65
|
+
* Log enhanced errors with full diagnostic information
|
|
66
|
+
*/
|
|
67
|
+
logEnhancedError(error: EnhancedError): void;
|
|
68
|
+
/**
|
|
69
|
+
* Log operation start with performance tracking
|
|
70
|
+
*/
|
|
71
|
+
logOperationStart(operation: string, component: string, context?: Record<string, any>): string;
|
|
72
|
+
/**
|
|
73
|
+
* Log operation completion with performance metrics
|
|
74
|
+
*/
|
|
75
|
+
logOperationComplete(operationId: string, operation: string, component: string, duration: number, context?: Record<string, any>): void;
|
|
76
|
+
/**
|
|
77
|
+
* Log operation failure with recovery suggestions
|
|
78
|
+
*/
|
|
79
|
+
logOperationFailure(operationId: string, operation: string, component: string, error: Error, duration: number, context?: Record<string, any>): void;
|
|
80
|
+
/**
|
|
81
|
+
* Log performance metrics
|
|
82
|
+
*/
|
|
83
|
+
logPerformanceMetrics(component: string, operation: string, metrics: {
|
|
84
|
+
memoryUsage?: number;
|
|
85
|
+
cpuUsage?: number;
|
|
86
|
+
duration?: number;
|
|
87
|
+
queueSize?: number;
|
|
88
|
+
activeOperations?: number;
|
|
89
|
+
throughput?: number;
|
|
90
|
+
}): void;
|
|
91
|
+
/**
|
|
92
|
+
* Get recent log entries for debugging
|
|
93
|
+
*/
|
|
94
|
+
getRecentLogs(count?: number): LogEntry[];
|
|
95
|
+
/**
|
|
96
|
+
* Get logs filtered by level and component
|
|
97
|
+
*/
|
|
98
|
+
getFilteredLogs(filters: {
|
|
99
|
+
level?: LogLevel;
|
|
100
|
+
component?: string;
|
|
101
|
+
operation?: string;
|
|
102
|
+
since?: Date;
|
|
103
|
+
}): LogEntry[];
|
|
104
|
+
/**
|
|
105
|
+
* Clear log buffer
|
|
106
|
+
*/
|
|
107
|
+
clearLogs(): void;
|
|
108
|
+
/**
|
|
109
|
+
* Core logging method
|
|
110
|
+
*/
|
|
111
|
+
private log;
|
|
112
|
+
/**
|
|
113
|
+
* Write log entry to configured outputs
|
|
114
|
+
*/
|
|
115
|
+
private writeLogEntry;
|
|
116
|
+
/**
|
|
117
|
+
* Write to console with appropriate formatting
|
|
118
|
+
*/
|
|
119
|
+
private writeToConsole;
|
|
120
|
+
/**
|
|
121
|
+
* Write to file (placeholder - would need file system implementation)
|
|
122
|
+
*/
|
|
123
|
+
private writeToFile;
|
|
124
|
+
/**
|
|
125
|
+
* Check if log level is enabled
|
|
126
|
+
*/
|
|
127
|
+
private isLevelEnabled;
|
|
128
|
+
/**
|
|
129
|
+
* Check if a specific level meets the filter criteria
|
|
130
|
+
*/
|
|
131
|
+
private levelMeetsFilter;
|
|
132
|
+
/**
|
|
133
|
+
* Map error severity to log level
|
|
134
|
+
*/
|
|
135
|
+
private mapSeverityToLogLevel;
|
|
136
|
+
/**
|
|
137
|
+
* Serialize error for logging
|
|
138
|
+
*/
|
|
139
|
+
private serializeError;
|
|
140
|
+
/**
|
|
141
|
+
* Get current memory usage
|
|
142
|
+
*/
|
|
143
|
+
private getMemoryUsage;
|
|
144
|
+
/**
|
|
145
|
+
* Generate unique operation ID
|
|
146
|
+
*/
|
|
147
|
+
private generateOperationId;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Global logger instance
|
|
151
|
+
*/
|
|
152
|
+
export declare const logger: EnhancedLogger;
|
|
153
|
+
/**
|
|
154
|
+
* Create component-specific logger
|
|
155
|
+
*/
|
|
156
|
+
export declare function createComponentLogger(component: string, config?: Partial<LoggerConfig>): ComponentLogger;
|
|
157
|
+
/**
|
|
158
|
+
* Component-specific logger wrapper
|
|
159
|
+
*/
|
|
160
|
+
export declare class ComponentLogger {
|
|
161
|
+
private logger;
|
|
162
|
+
private component;
|
|
163
|
+
constructor(component: string, config?: Partial<LoggerConfig>);
|
|
164
|
+
debug(message: string, context?: Record<string, any>): void;
|
|
165
|
+
info(message: string, context?: Record<string, any>): void;
|
|
166
|
+
warn(message: string, context?: Record<string, any>): void;
|
|
167
|
+
error(message: string, error?: Error, context?: Record<string, any>): void;
|
|
168
|
+
critical(message: string, error?: Error, context?: Record<string, any>): void;
|
|
169
|
+
logEnhancedError(error: EnhancedError): void;
|
|
170
|
+
logOperationStart(operation: string, context?: Record<string, any>): string;
|
|
171
|
+
logOperationComplete(operationId: string, operation: string, duration: number, context?: Record<string, any>): void;
|
|
172
|
+
logOperationFailure(operationId: string, operation: string, error: Error, duration: number, context?: Record<string, any>): void;
|
|
173
|
+
logPerformanceMetrics(operation: string, metrics: Record<string, any>): void;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Error recovery utilities
|
|
177
|
+
*/
|
|
178
|
+
export declare class ErrorRecoveryManager {
|
|
179
|
+
private logger;
|
|
180
|
+
private recoveryStrategies;
|
|
181
|
+
constructor(logger?: EnhancedLogger);
|
|
182
|
+
/**
|
|
183
|
+
* Register recovery strategy for specific error codes
|
|
184
|
+
*/
|
|
185
|
+
registerRecoveryStrategy(errorCode: string, strategy: (error: EnhancedError) => Promise<boolean>): void;
|
|
186
|
+
/**
|
|
187
|
+
* Attempt to recover from an enhanced error
|
|
188
|
+
*/
|
|
189
|
+
attemptRecovery(error: EnhancedError): Promise<boolean>;
|
|
190
|
+
/**
|
|
191
|
+
* Get recovery suggestions for an error
|
|
192
|
+
*/
|
|
193
|
+
getRecoverySuggestions(error: EnhancedError): string[];
|
|
194
|
+
}
|
|
195
|
+
//# sourceMappingURL=enhanced-logging.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enhanced-logging.d.ts","sourceRoot":"","sources":["../../../src/utils/enhanced-logging.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAE/E,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;AAExE,MAAM,WAAW,QAAQ;IACvB,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAA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