@revenium/litellm 0.0.1
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/LICENSE +21 -0
- package/README.md +630 -0
- package/dist/client.d.ts +17 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +713 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +42 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +332 -0
- package/dist/config.js.map +1 -0
- package/dist/constants.d.ts +15 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +101 -0
- package/dist/constants.js.map +1 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +189 -0
- package/dist/index.js.map +1 -0
- package/dist/prompt-extraction.d.ts +11 -0
- package/dist/prompt-extraction.d.ts.map +1 -0
- package/dist/prompt-extraction.js +201 -0
- package/dist/prompt-extraction.js.map +1 -0
- package/dist/tracking.d.ts +47 -0
- package/dist/tracking.d.ts.map +1 -0
- package/dist/tracking.js +299 -0
- package/dist/tracking.js.map +1 -0
- package/dist/types.d.ts +348 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/circuit-breaker.d.ts +114 -0
- package/dist/utils/circuit-breaker.d.ts.map +1 -0
- package/dist/utils/circuit-breaker.js +216 -0
- package/dist/utils/circuit-breaker.js.map +1 -0
- package/dist/utils/error-handling.d.ts +166 -0
- package/dist/utils/error-handling.d.ts.map +1 -0
- package/dist/utils/error-handling.js +306 -0
- package/dist/utils/error-handling.js.map +1 -0
- package/dist/utils/logger-types.d.ts +171 -0
- package/dist/utils/logger-types.d.ts.map +1 -0
- package/dist/utils/logger-types.js +210 -0
- package/dist/utils/logger-types.js.map +1 -0
- package/dist/utils/provider-detection.d.ts +43 -0
- package/dist/utils/provider-detection.d.ts.map +1 -0
- package/dist/utils/provider-detection.js +103 -0
- package/dist/utils/provider-detection.js.map +1 -0
- package/dist/utils/stop-reason.d.ts +58 -0
- package/dist/utils/stop-reason.d.ts.map +1 -0
- package/dist/utils/stop-reason.js +136 -0
- package/dist/utils/stop-reason.js.map +1 -0
- package/dist/utils/summary-printer.d.ts +23 -0
- package/dist/utils/summary-printer.d.ts.map +1 -0
- package/dist/utils/summary-printer.js +234 -0
- package/dist/utils/summary-printer.js.map +1 -0
- package/dist/utils/trace-fields.d.ts +10 -0
- package/dist/utils/trace-fields.d.ts.map +1 -0
- package/dist/utils/trace-fields.js +117 -0
- package/dist/utils/trace-fields.js.map +1 -0
- package/dist/utils/validation.d.ts +121 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +451 -0
- package/dist/utils/validation.js.map +1 -0
- package/examples/README.md +321 -0
- package/examples/litellm-basic.ts +240 -0
- package/examples/litellm-streaming.ts +309 -0
- package/examples/prompt-capture.ts +128 -0
- package/package.json +85 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Circuit breaker pattern implementation for handling repeated failures
|
|
3
|
+
*
|
|
4
|
+
* This module provides a circuit breaker to prevent cascading failures
|
|
5
|
+
* when the Revenium API is experiencing issues.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Circuit breaker states
|
|
9
|
+
*/
|
|
10
|
+
export declare enum CircuitState {
|
|
11
|
+
CLOSED = "CLOSED",// Normal operation
|
|
12
|
+
OPEN = "OPEN",// Failing fast
|
|
13
|
+
HALF_OPEN = "HALF_OPEN"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Circuit breaker configuration
|
|
17
|
+
*/
|
|
18
|
+
export interface CircuitBreakerConfig {
|
|
19
|
+
/** Number of failures before opening circuit */
|
|
20
|
+
failureThreshold: number;
|
|
21
|
+
/** Time in ms to wait before attempting recovery */
|
|
22
|
+
recoveryTimeout: number;
|
|
23
|
+
/** Number of successful calls needed to close circuit from half-open */
|
|
24
|
+
successThreshold: number;
|
|
25
|
+
/** Time window in ms for counting failures */
|
|
26
|
+
timeWindow: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Default circuit breaker configuration
|
|
30
|
+
*/
|
|
31
|
+
export declare const DEFAULT_CIRCUIT_CONFIG: CircuitBreakerConfig;
|
|
32
|
+
/**
|
|
33
|
+
* Circuit breaker implementation
|
|
34
|
+
*/
|
|
35
|
+
export declare class CircuitBreaker {
|
|
36
|
+
private config;
|
|
37
|
+
private state;
|
|
38
|
+
private failureCount;
|
|
39
|
+
private successCount;
|
|
40
|
+
private lastFailureTime;
|
|
41
|
+
private failures;
|
|
42
|
+
constructor(config?: CircuitBreakerConfig);
|
|
43
|
+
/**
|
|
44
|
+
* Execute a function with circuit breaker protection
|
|
45
|
+
* @param fn - Function to execute
|
|
46
|
+
* @returns Promise that resolves with function result or rejects if circuit is open
|
|
47
|
+
*/
|
|
48
|
+
execute<T>(fn: () => Promise<T>): Promise<T>;
|
|
49
|
+
/**
|
|
50
|
+
* Check if circuit breaker allows execution
|
|
51
|
+
* @returns True if execution is allowed
|
|
52
|
+
*/
|
|
53
|
+
canExecute(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Get current circuit breaker state
|
|
56
|
+
*/
|
|
57
|
+
getState(): CircuitState;
|
|
58
|
+
/**
|
|
59
|
+
* Get circuit breaker statistics
|
|
60
|
+
*/
|
|
61
|
+
getStats(): {
|
|
62
|
+
state: CircuitState;
|
|
63
|
+
failureCount: number;
|
|
64
|
+
successCount: number;
|
|
65
|
+
recentFailures: number;
|
|
66
|
+
timeUntilRecovery?: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Reset circuit breaker to closed state
|
|
70
|
+
*/
|
|
71
|
+
reset(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Handle successful execution
|
|
74
|
+
*/
|
|
75
|
+
private onSuccess;
|
|
76
|
+
/**
|
|
77
|
+
* Handle failed execution
|
|
78
|
+
*/
|
|
79
|
+
private onFailure;
|
|
80
|
+
/**
|
|
81
|
+
* Check if we should attempt recovery from open state
|
|
82
|
+
*/
|
|
83
|
+
private shouldAttemptRecovery;
|
|
84
|
+
/**
|
|
85
|
+
* Remove old failure timestamps outside the time window
|
|
86
|
+
*/
|
|
87
|
+
private cleanupOldFailures;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Get or create the global circuit breaker instance
|
|
91
|
+
* @param config - Optional configuration for the circuit breaker
|
|
92
|
+
* @returns Global circuit breaker instance
|
|
93
|
+
*/
|
|
94
|
+
export declare function getCircuitBreaker(config?: Partial<CircuitBreakerConfig>): CircuitBreaker;
|
|
95
|
+
/**
|
|
96
|
+
* Reset the global circuit breaker
|
|
97
|
+
*/
|
|
98
|
+
export declare function resetCircuitBreaker(): void;
|
|
99
|
+
/**
|
|
100
|
+
* Check if the global circuit breaker allows execution
|
|
101
|
+
* @returns True if execution is allowed
|
|
102
|
+
*/
|
|
103
|
+
export declare function canExecuteRequest(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Execute a function with global circuit breaker protection
|
|
106
|
+
* @param fn - Function to execute
|
|
107
|
+
* @returns Promise that resolves with function result
|
|
108
|
+
*/
|
|
109
|
+
export declare function executeWithCircuitBreaker<T>(fn: () => Promise<T>): Promise<T>;
|
|
110
|
+
/**
|
|
111
|
+
* Get global circuit breaker statistics
|
|
112
|
+
*/
|
|
113
|
+
export declare function getCircuitBreakerStats(): ReturnType<CircuitBreaker['getStats']>;
|
|
114
|
+
//# sourceMappingURL=circuit-breaker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circuit-breaker.d.ts","sourceRoot":"","sources":["../../src/utils/circuit-breaker.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,oBAAY,YAAY;IACtB,MAAM,WAAW,CAAM,mBA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AAE,OAAO,CAAC,oBAAoB,CAAC,GAAG,cAAc,CAMxF;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,CAAC,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEnF;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,UAAU,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAE/E"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Circuit breaker pattern implementation for handling repeated failures
|
|
4
|
+
*
|
|
5
|
+
* This module provides a circuit breaker to prevent cascading failures
|
|
6
|
+
* when the Revenium API is experiencing issues.
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.CircuitBreaker = exports.DEFAULT_CIRCUIT_CONFIG = exports.CircuitState = void 0;
|
|
10
|
+
exports.getCircuitBreaker = getCircuitBreaker;
|
|
11
|
+
exports.resetCircuitBreaker = resetCircuitBreaker;
|
|
12
|
+
exports.canExecuteRequest = canExecuteRequest;
|
|
13
|
+
exports.executeWithCircuitBreaker = executeWithCircuitBreaker;
|
|
14
|
+
exports.getCircuitBreakerStats = getCircuitBreakerStats;
|
|
15
|
+
/**
|
|
16
|
+
* Circuit breaker states
|
|
17
|
+
*/
|
|
18
|
+
var CircuitState;
|
|
19
|
+
(function (CircuitState) {
|
|
20
|
+
CircuitState["CLOSED"] = "CLOSED";
|
|
21
|
+
CircuitState["OPEN"] = "OPEN";
|
|
22
|
+
CircuitState["HALF_OPEN"] = "HALF_OPEN"; // Testing if service recovered
|
|
23
|
+
})(CircuitState || (exports.CircuitState = CircuitState = {}));
|
|
24
|
+
/**
|
|
25
|
+
* Default circuit breaker configuration
|
|
26
|
+
*/
|
|
27
|
+
exports.DEFAULT_CIRCUIT_CONFIG = {
|
|
28
|
+
failureThreshold: 5,
|
|
29
|
+
recoveryTimeout: 30000, // 30 seconds
|
|
30
|
+
successThreshold: 3,
|
|
31
|
+
timeWindow: 60000 // 1 minute
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Circuit breaker implementation
|
|
35
|
+
*/
|
|
36
|
+
class CircuitBreaker {
|
|
37
|
+
constructor(config = exports.DEFAULT_CIRCUIT_CONFIG) {
|
|
38
|
+
this.config = config;
|
|
39
|
+
this.state = CircuitState.CLOSED;
|
|
40
|
+
this.failureCount = 0;
|
|
41
|
+
this.successCount = 0;
|
|
42
|
+
this.lastFailureTime = 0;
|
|
43
|
+
this.failures = []; // Timestamps of failures
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Execute a function with circuit breaker protection
|
|
47
|
+
* @param fn - Function to execute
|
|
48
|
+
* @returns Promise that resolves with function result or rejects if circuit is open
|
|
49
|
+
*/
|
|
50
|
+
async execute(fn) {
|
|
51
|
+
if (this.state === CircuitState.OPEN) {
|
|
52
|
+
if (this.shouldAttemptRecovery()) {
|
|
53
|
+
this.state = CircuitState.HALF_OPEN;
|
|
54
|
+
this.successCount = 0;
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
throw new Error('Circuit breaker is OPEN - failing fast');
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
try {
|
|
61
|
+
const result = await fn();
|
|
62
|
+
this.onSuccess();
|
|
63
|
+
return result;
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
this.onFailure();
|
|
67
|
+
throw error;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Check if circuit breaker allows execution
|
|
72
|
+
* @returns True if execution is allowed
|
|
73
|
+
*/
|
|
74
|
+
canExecute() {
|
|
75
|
+
if (this.state === CircuitState.CLOSED || this.state === CircuitState.HALF_OPEN)
|
|
76
|
+
return true;
|
|
77
|
+
if (this.state === CircuitState.OPEN && this.shouldAttemptRecovery())
|
|
78
|
+
return true;
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Get current circuit breaker state
|
|
83
|
+
*/
|
|
84
|
+
getState() {
|
|
85
|
+
return this.state;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get circuit breaker statistics
|
|
89
|
+
*/
|
|
90
|
+
getStats() {
|
|
91
|
+
const now = Date.now();
|
|
92
|
+
const recentFailures = this.failures.filter(timestamp => now - timestamp < this.config.timeWindow).length;
|
|
93
|
+
let timeUntilRecovery;
|
|
94
|
+
if (this.state === CircuitState.OPEN) {
|
|
95
|
+
const timeSinceLastFailure = now - this.lastFailureTime;
|
|
96
|
+
timeUntilRecovery = Math.max(0, this.config.recoveryTimeout - timeSinceLastFailure);
|
|
97
|
+
}
|
|
98
|
+
return {
|
|
99
|
+
state: this.state,
|
|
100
|
+
failureCount: this.failureCount,
|
|
101
|
+
successCount: this.successCount,
|
|
102
|
+
recentFailures,
|
|
103
|
+
timeUntilRecovery
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Reset circuit breaker to closed state
|
|
108
|
+
*/
|
|
109
|
+
reset() {
|
|
110
|
+
this.state = CircuitState.CLOSED;
|
|
111
|
+
this.failureCount = 0;
|
|
112
|
+
this.successCount = 0;
|
|
113
|
+
this.lastFailureTime = 0;
|
|
114
|
+
this.failures = [];
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Handle successful execution
|
|
118
|
+
*/
|
|
119
|
+
onSuccess() {
|
|
120
|
+
if (this.state === CircuitState.HALF_OPEN) {
|
|
121
|
+
this.successCount++;
|
|
122
|
+
if (this.successCount >= this.config.successThreshold) {
|
|
123
|
+
this.state = CircuitState.CLOSED;
|
|
124
|
+
this.failureCount = 0;
|
|
125
|
+
this.failures = [];
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
else if (this.state === CircuitState.CLOSED) {
|
|
129
|
+
// Reset failure count on success in closed state
|
|
130
|
+
this.failureCount = 0;
|
|
131
|
+
this.cleanupOldFailures();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Handle failed execution
|
|
136
|
+
*/
|
|
137
|
+
onFailure() {
|
|
138
|
+
const now = Date.now();
|
|
139
|
+
this.failureCount++;
|
|
140
|
+
this.lastFailureTime = now;
|
|
141
|
+
this.failures.push(now);
|
|
142
|
+
this.cleanupOldFailures();
|
|
143
|
+
if (this.state === CircuitState.HALF_OPEN) {
|
|
144
|
+
// Go back to open state on any failure in half-open
|
|
145
|
+
this.state = CircuitState.OPEN;
|
|
146
|
+
this.successCount = 0;
|
|
147
|
+
}
|
|
148
|
+
else if (this.state === CircuitState.CLOSED) {
|
|
149
|
+
// Check if we should open the circuit
|
|
150
|
+
const recentFailures = this.failures.filter(timestamp => now - timestamp < this.config.timeWindow).length;
|
|
151
|
+
if (recentFailures >= this.config.failureThreshold) {
|
|
152
|
+
this.state = CircuitState.OPEN;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Check if we should attempt recovery from open state
|
|
158
|
+
*/
|
|
159
|
+
shouldAttemptRecovery() {
|
|
160
|
+
const now = Date.now();
|
|
161
|
+
return now - this.lastFailureTime >= this.config.recoveryTimeout;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Remove old failure timestamps outside the time window
|
|
165
|
+
*/
|
|
166
|
+
cleanupOldFailures() {
|
|
167
|
+
const now = Date.now();
|
|
168
|
+
this.failures = this.failures.filter(timestamp => now - timestamp < this.config.timeWindow);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
exports.CircuitBreaker = CircuitBreaker;
|
|
172
|
+
/**
|
|
173
|
+
* Global circuit breaker instance for Revenium API calls
|
|
174
|
+
*/
|
|
175
|
+
let globalCircuitBreaker = null;
|
|
176
|
+
/**
|
|
177
|
+
* Get or create the global circuit breaker instance
|
|
178
|
+
* @param config - Optional configuration for the circuit breaker
|
|
179
|
+
* @returns Global circuit breaker instance
|
|
180
|
+
*/
|
|
181
|
+
function getCircuitBreaker(config) {
|
|
182
|
+
if (!globalCircuitBreaker) {
|
|
183
|
+
const finalConfig = config ? { ...exports.DEFAULT_CIRCUIT_CONFIG, ...config } : exports.DEFAULT_CIRCUIT_CONFIG;
|
|
184
|
+
globalCircuitBreaker = new CircuitBreaker(finalConfig);
|
|
185
|
+
}
|
|
186
|
+
return globalCircuitBreaker;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Reset the global circuit breaker
|
|
190
|
+
*/
|
|
191
|
+
function resetCircuitBreaker() {
|
|
192
|
+
if (globalCircuitBreaker)
|
|
193
|
+
globalCircuitBreaker.reset();
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Check if the global circuit breaker allows execution
|
|
197
|
+
* @returns True if execution is allowed
|
|
198
|
+
*/
|
|
199
|
+
function canExecuteRequest() {
|
|
200
|
+
return getCircuitBreaker().canExecute();
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Execute a function with global circuit breaker protection
|
|
204
|
+
* @param fn - Function to execute
|
|
205
|
+
* @returns Promise that resolves with function result
|
|
206
|
+
*/
|
|
207
|
+
async function executeWithCircuitBreaker(fn) {
|
|
208
|
+
return getCircuitBreaker().execute(fn);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* Get global circuit breaker statistics
|
|
212
|
+
*/
|
|
213
|
+
function getCircuitBreakerStats() {
|
|
214
|
+
return getCircuitBreaker().getStats();
|
|
215
|
+
}
|
|
216
|
+
//# sourceMappingURL=circuit-breaker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"circuit-breaker.js","sourceRoot":"","sources":["../../src/utils/circuit-breaker.ts"],"names":[],"mappings":";AAAA;;;;;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QAAE,oBAAoB,CAAC,KAAK,EAAE,CAAC;AACzD,CAAC;AAED;;;GAGG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,iBAAiB,EAAE,CAAC,UAAU,EAAE,CAAC;AAC1C,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,yBAAyB,CAAI,EAAoB;IACrE,OAAO,iBAAiB,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,SAAgB,sBAAsB;IACpC,OAAO,iBAAiB,EAAE,CAAC,QAAQ,EAAE,CAAC;AACxC,CAAC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Error handling utilities for consistent error management
|
|
3
|
+
*
|
|
4
|
+
* This module provides centralized error handling and custom error types
|
|
5
|
+
* for better error reporting and debugging.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Base error class for Revenium middleware errors
|
|
9
|
+
*/
|
|
10
|
+
export declare class ReveniumError extends Error {
|
|
11
|
+
readonly code: string;
|
|
12
|
+
readonly context?: Record<string, unknown>;
|
|
13
|
+
constructor(message: string, code: string, context?: Record<string, unknown>);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Configuration-related errors
|
|
17
|
+
*/
|
|
18
|
+
export declare class ConfigurationError extends ReveniumError {
|
|
19
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* HTTP client patching errors
|
|
23
|
+
*/
|
|
24
|
+
export declare class PatchingError extends ReveniumError {
|
|
25
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Request processing errors
|
|
29
|
+
*/
|
|
30
|
+
export declare class RequestProcessingError extends ReveniumError {
|
|
31
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Revenium API communication errors
|
|
35
|
+
*/
|
|
36
|
+
export declare class ReveniumApiError extends ReveniumError {
|
|
37
|
+
readonly statusCode?: number;
|
|
38
|
+
readonly responseBody?: string;
|
|
39
|
+
constructor(message: string, statusCode?: number, responseBody?: string, context?: Record<string, unknown>);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Validation errors
|
|
43
|
+
*/
|
|
44
|
+
export declare class ValidationError extends ReveniumError {
|
|
45
|
+
readonly validationErrors: string[];
|
|
46
|
+
constructor(message: string, validationErrors: string[], context?: Record<string, unknown>);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stream processing errors
|
|
50
|
+
*/
|
|
51
|
+
export declare class StreamProcessingError extends ReveniumError {
|
|
52
|
+
constructor(message: string, context?: Record<string, unknown>);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Error context builder for consistent error reporting
|
|
56
|
+
*/
|
|
57
|
+
export declare class ErrorContext {
|
|
58
|
+
private context;
|
|
59
|
+
/**
|
|
60
|
+
* Add request ID to error context
|
|
61
|
+
*/
|
|
62
|
+
withRequestId(requestId: string): this;
|
|
63
|
+
/**
|
|
64
|
+
* Add model information to error context
|
|
65
|
+
*/
|
|
66
|
+
withModel(model: string): this;
|
|
67
|
+
/**
|
|
68
|
+
* Add URL to error context
|
|
69
|
+
*/
|
|
70
|
+
withUrl(url: string): this;
|
|
71
|
+
/**
|
|
72
|
+
* Add HTTP status to error context
|
|
73
|
+
*/
|
|
74
|
+
withStatus(status: number): this;
|
|
75
|
+
/**
|
|
76
|
+
* Add duration to error context
|
|
77
|
+
*/
|
|
78
|
+
withDuration(duration: number): this;
|
|
79
|
+
/**
|
|
80
|
+
* Add custom field to error context
|
|
81
|
+
*/
|
|
82
|
+
with(key: string, value: unknown): this;
|
|
83
|
+
/**
|
|
84
|
+
* Build the context object
|
|
85
|
+
*/
|
|
86
|
+
build(): Record<string, unknown>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Safe error message extraction
|
|
90
|
+
* @param error - Error to extract message from
|
|
91
|
+
* @returns Safe error message string
|
|
92
|
+
*/
|
|
93
|
+
export declare function getErrorMessage(error: unknown): string;
|
|
94
|
+
/**
|
|
95
|
+
* Safe error stack extraction
|
|
96
|
+
* @param error - Error to extract stack from
|
|
97
|
+
* @returns Error stack or undefined
|
|
98
|
+
*/
|
|
99
|
+
export declare function getErrorStack(error: unknown): string | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Create error context builder
|
|
102
|
+
* @returns New error context builder
|
|
103
|
+
*/
|
|
104
|
+
export declare function createErrorContext(): ErrorContext;
|
|
105
|
+
/**
|
|
106
|
+
* Handle and log errors consistently
|
|
107
|
+
* @param error - Error to handle
|
|
108
|
+
* @param logger - Logger instance
|
|
109
|
+
* @param context - Additional context
|
|
110
|
+
*/
|
|
111
|
+
export declare function handleError(error: unknown, logger: {
|
|
112
|
+
error: (message: string, ...args: unknown[]) => void;
|
|
113
|
+
}, context?: Record<string, unknown>): void;
|
|
114
|
+
/**
|
|
115
|
+
* Wrap async function with error handling
|
|
116
|
+
* @param fn - Function to wrap
|
|
117
|
+
* @param errorHandler - Error handler function
|
|
118
|
+
* @returns Wrapped function
|
|
119
|
+
*/
|
|
120
|
+
export declare function withErrorHandling<T extends unknown[], R>(fn: (...args: T) => Promise<R>, errorHandler: (error: unknown, ...args: T) => void): (...args: T) => Promise<R | undefined>;
|
|
121
|
+
/**
|
|
122
|
+
* Error handling strategy configuration
|
|
123
|
+
*/
|
|
124
|
+
export interface ErrorHandlingStrategy {
|
|
125
|
+
/** Whether to fail silently or throw errors */
|
|
126
|
+
failSilent: boolean;
|
|
127
|
+
/** Maximum number of retries */
|
|
128
|
+
maxRetries: number;
|
|
129
|
+
/** Base delay for retries in milliseconds */
|
|
130
|
+
baseDelay: number;
|
|
131
|
+
/** Whether to log errors */
|
|
132
|
+
logErrors: boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Default error handling strategy
|
|
136
|
+
*/
|
|
137
|
+
export declare const DEFAULT_ERROR_STRATEGY: ErrorHandlingStrategy;
|
|
138
|
+
/**
|
|
139
|
+
* Result of an operation that may fail
|
|
140
|
+
*/
|
|
141
|
+
export interface OperationResult<T> {
|
|
142
|
+
success: boolean;
|
|
143
|
+
data?: T;
|
|
144
|
+
error?: Error;
|
|
145
|
+
retryCount?: number;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Execute operation with consistent error handling
|
|
149
|
+
* @param fn - Function to execute
|
|
150
|
+
* @param strategy - Error handling strategy
|
|
151
|
+
* @param logger - Logger instance
|
|
152
|
+
* @param context - Additional context for logging
|
|
153
|
+
* @returns Operation result
|
|
154
|
+
*/
|
|
155
|
+
export declare function executeWithErrorHandling<T>(fn: () => Promise<T>, strategy?: ErrorHandlingStrategy, logger?: {
|
|
156
|
+
error: (message: string, context?: Record<string, unknown>) => void;
|
|
157
|
+
}, context?: Record<string, unknown>): Promise<OperationResult<T>>;
|
|
158
|
+
/**
|
|
159
|
+
* Retry function with exponential backoff
|
|
160
|
+
* @param fn - Function to retry
|
|
161
|
+
* @param maxRetries - Maximum number of retries
|
|
162
|
+
* @param baseDelay - Base delay in milliseconds
|
|
163
|
+
* @returns Promise that resolves with function result or rejects with last error
|
|
164
|
+
*/
|
|
165
|
+
export declare function withRetry<T>(fn: () => Promise<T>, maxRetries?: number, baseDelay?: number): Promise<T>;
|
|
166
|
+
//# sourceMappingURL=error-handling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handling.d.ts","sourceRoot":"","sources":["../../src/utils/error-handling.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,SAAgB,IAAI,EAAE,MAAM,CAAC;IAC7B,SAAgB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAEtC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,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