erosolar-cli 1.5.11 → 1.5.13
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/core/agent.d.ts +8 -0
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +62 -9
- package/dist/core/agent.js.map +1 -1
- package/dist/core/contextManager.d.ts +98 -0
- package/dist/core/contextManager.d.ts.map +1 -1
- package/dist/core/contextManager.js +492 -4
- package/dist/core/contextManager.js.map +1 -1
- package/dist/core/modelDiscovery.d.ts +3 -0
- package/dist/core/modelDiscovery.d.ts.map +1 -1
- package/dist/core/modelDiscovery.js +49 -30
- package/dist/core/modelDiscovery.js.map +1 -1
- package/dist/core/unified/toolRuntime.d.ts +3 -0
- package/dist/core/unified/toolRuntime.d.ts.map +1 -1
- package/dist/core/unified/toolRuntime.js +28 -9
- package/dist/core/unified/toolRuntime.js.map +1 -1
- package/dist/providers/resilientProvider.d.ts +94 -0
- package/dist/providers/resilientProvider.d.ts.map +1 -0
- package/dist/providers/resilientProvider.js +324 -0
- package/dist/providers/resilientProvider.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resilient Provider Wrapper
|
|
3
|
+
*
|
|
4
|
+
* Adds rate limiting, exponential backoff retry, and circuit breaker
|
|
5
|
+
* patterns to any LLM provider for maximum reliability and performance.
|
|
6
|
+
*
|
|
7
|
+
* PERF: Provider-agnostic wrapper that prevents rate limit errors and
|
|
8
|
+
* automatically recovers from transient failures.
|
|
9
|
+
*/
|
|
10
|
+
import { RateLimiter, retry, sleep } from '../utils/asyncUtils.js';
|
|
11
|
+
// ============================================================================
|
|
12
|
+
// Rate Limit Error Detection
|
|
13
|
+
// ============================================================================
|
|
14
|
+
const RATE_LIMIT_PATTERNS = [
|
|
15
|
+
'rate limit',
|
|
16
|
+
'rate_limit',
|
|
17
|
+
'ratelimit',
|
|
18
|
+
'too many requests',
|
|
19
|
+
'429',
|
|
20
|
+
'quota exceeded',
|
|
21
|
+
'request limit',
|
|
22
|
+
'throttled',
|
|
23
|
+
'overloaded',
|
|
24
|
+
'capacity',
|
|
25
|
+
];
|
|
26
|
+
const TRANSIENT_ERROR_PATTERNS = [
|
|
27
|
+
'timeout',
|
|
28
|
+
'timed out',
|
|
29
|
+
'network',
|
|
30
|
+
'connection',
|
|
31
|
+
'econnrefused',
|
|
32
|
+
'econnreset',
|
|
33
|
+
'socket',
|
|
34
|
+
'temporarily unavailable',
|
|
35
|
+
'502',
|
|
36
|
+
'503',
|
|
37
|
+
'504',
|
|
38
|
+
'bad gateway',
|
|
39
|
+
'service unavailable',
|
|
40
|
+
'gateway timeout',
|
|
41
|
+
'internal server error',
|
|
42
|
+
'500',
|
|
43
|
+
];
|
|
44
|
+
function isRateLimitError(error) {
|
|
45
|
+
if (!(error instanceof Error))
|
|
46
|
+
return false;
|
|
47
|
+
const message = error.message.toLowerCase();
|
|
48
|
+
return RATE_LIMIT_PATTERNS.some(pattern => message.includes(pattern));
|
|
49
|
+
}
|
|
50
|
+
function isTransientError(error) {
|
|
51
|
+
if (!(error instanceof Error))
|
|
52
|
+
return false;
|
|
53
|
+
const message = error.message.toLowerCase();
|
|
54
|
+
return TRANSIENT_ERROR_PATTERNS.some(pattern => message.includes(pattern));
|
|
55
|
+
}
|
|
56
|
+
function shouldRetry(error) {
|
|
57
|
+
return isRateLimitError(error) || isTransientError(error);
|
|
58
|
+
}
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// Resilient Provider Implementation
|
|
61
|
+
// ============================================================================
|
|
62
|
+
/**
|
|
63
|
+
* Wraps any LLM provider with rate limiting and retry logic
|
|
64
|
+
*/
|
|
65
|
+
export class ResilientProvider {
|
|
66
|
+
id;
|
|
67
|
+
model;
|
|
68
|
+
provider;
|
|
69
|
+
rateLimiter;
|
|
70
|
+
config;
|
|
71
|
+
circuitBreaker;
|
|
72
|
+
stats = {
|
|
73
|
+
totalRequests: 0,
|
|
74
|
+
rateLimitHits: 0,
|
|
75
|
+
retries: 0,
|
|
76
|
+
circuitBreakerTrips: 0,
|
|
77
|
+
};
|
|
78
|
+
constructor(provider, config = {}) {
|
|
79
|
+
this.provider = provider;
|
|
80
|
+
this.id = provider.id;
|
|
81
|
+
this.model = provider.model;
|
|
82
|
+
this.config = {
|
|
83
|
+
maxRequestsPerMinute: config.maxRequestsPerMinute ?? 50,
|
|
84
|
+
maxRetries: config.maxRetries ?? 4,
|
|
85
|
+
baseDelayMs: config.baseDelayMs ?? 1000,
|
|
86
|
+
maxDelayMs: config.maxDelayMs ?? 32000,
|
|
87
|
+
enableCircuitBreaker: config.enableCircuitBreaker ?? true,
|
|
88
|
+
circuitBreakerThreshold: config.circuitBreakerThreshold ?? 5,
|
|
89
|
+
circuitBreakerResetMs: config.circuitBreakerResetMs ?? 60000,
|
|
90
|
+
};
|
|
91
|
+
this.rateLimiter = new RateLimiter({
|
|
92
|
+
maxRequests: this.config.maxRequestsPerMinute,
|
|
93
|
+
windowMs: 60000,
|
|
94
|
+
});
|
|
95
|
+
this.circuitBreaker = {
|
|
96
|
+
failures: 0,
|
|
97
|
+
lastFailure: 0,
|
|
98
|
+
isOpen: false,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Check and potentially reset circuit breaker
|
|
103
|
+
*/
|
|
104
|
+
checkCircuitBreaker() {
|
|
105
|
+
if (!this.config.enableCircuitBreaker)
|
|
106
|
+
return;
|
|
107
|
+
if (this.circuitBreaker.isOpen) {
|
|
108
|
+
const elapsed = Date.now() - this.circuitBreaker.lastFailure;
|
|
109
|
+
if (elapsed >= this.config.circuitBreakerResetMs) {
|
|
110
|
+
// Half-open: allow one request through
|
|
111
|
+
this.circuitBreaker.isOpen = false;
|
|
112
|
+
this.circuitBreaker.failures = Math.floor(this.circuitBreaker.failures / 2);
|
|
113
|
+
}
|
|
114
|
+
else {
|
|
115
|
+
throw new Error(`Circuit breaker is open. Too many failures (${this.circuitBreaker.failures}). ` +
|
|
116
|
+
`Retry in ${Math.ceil((this.config.circuitBreakerResetMs - elapsed) / 1000)}s.`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Record a failure for circuit breaker
|
|
122
|
+
*/
|
|
123
|
+
recordFailure(_error) {
|
|
124
|
+
if (!this.config.enableCircuitBreaker)
|
|
125
|
+
return;
|
|
126
|
+
this.circuitBreaker.failures++;
|
|
127
|
+
this.circuitBreaker.lastFailure = Date.now();
|
|
128
|
+
if (this.circuitBreaker.failures >= this.config.circuitBreakerThreshold) {
|
|
129
|
+
this.circuitBreaker.isOpen = true;
|
|
130
|
+
this.stats.circuitBreakerTrips++;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Record a success to reset circuit breaker
|
|
135
|
+
*/
|
|
136
|
+
recordSuccess() {
|
|
137
|
+
if (this.config.enableCircuitBreaker && this.circuitBreaker.failures > 0) {
|
|
138
|
+
this.circuitBreaker.failures = Math.max(0, this.circuitBreaker.failures - 1);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Execute a request with rate limiting and retry
|
|
143
|
+
*/
|
|
144
|
+
async executeWithResilience(operation, _operationName) {
|
|
145
|
+
this.stats.totalRequests++;
|
|
146
|
+
// Check circuit breaker
|
|
147
|
+
this.checkCircuitBreaker();
|
|
148
|
+
// Acquire rate limit token
|
|
149
|
+
await this.rateLimiter.acquire();
|
|
150
|
+
try {
|
|
151
|
+
const result = await retry(operation, {
|
|
152
|
+
maxRetries: this.config.maxRetries,
|
|
153
|
+
baseDelayMs: this.config.baseDelayMs,
|
|
154
|
+
maxDelayMs: this.config.maxDelayMs,
|
|
155
|
+
backoffMultiplier: 2,
|
|
156
|
+
shouldRetry: (error) => {
|
|
157
|
+
if (shouldRetry(error)) {
|
|
158
|
+
this.stats.retries++;
|
|
159
|
+
if (isRateLimitError(error)) {
|
|
160
|
+
this.stats.rateLimitHits++;
|
|
161
|
+
}
|
|
162
|
+
return true;
|
|
163
|
+
}
|
|
164
|
+
return false;
|
|
165
|
+
},
|
|
166
|
+
});
|
|
167
|
+
this.recordSuccess();
|
|
168
|
+
return result;
|
|
169
|
+
}
|
|
170
|
+
catch (error) {
|
|
171
|
+
this.recordFailure(error);
|
|
172
|
+
throw error;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Generate a response with resilience
|
|
177
|
+
*/
|
|
178
|
+
async generate(messages, tools) {
|
|
179
|
+
return this.executeWithResilience(() => this.provider.generate(messages, tools), 'generate');
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Generate a streaming response with resilience
|
|
183
|
+
*
|
|
184
|
+
* Note: Retry logic is limited for streaming - we can only retry
|
|
185
|
+
* before the stream starts, not mid-stream.
|
|
186
|
+
*/
|
|
187
|
+
async *generateStream(messages, tools) {
|
|
188
|
+
if (!this.provider.generateStream) {
|
|
189
|
+
// Fall back to non-streaming
|
|
190
|
+
const response = await this.generate(messages, tools);
|
|
191
|
+
if (response.type === 'message') {
|
|
192
|
+
yield { type: 'content', content: response.content };
|
|
193
|
+
}
|
|
194
|
+
else if (response.type === 'tool_calls') {
|
|
195
|
+
if (response.content) {
|
|
196
|
+
yield { type: 'content', content: response.content };
|
|
197
|
+
}
|
|
198
|
+
if (response.toolCalls) {
|
|
199
|
+
for (const call of response.toolCalls) {
|
|
200
|
+
yield { type: 'tool_call', toolCall: call };
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (response.usage) {
|
|
205
|
+
yield { type: 'usage', usage: response.usage };
|
|
206
|
+
}
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
this.stats.totalRequests++;
|
|
210
|
+
// Check circuit breaker
|
|
211
|
+
this.checkCircuitBreaker();
|
|
212
|
+
// Acquire rate limit token
|
|
213
|
+
await this.rateLimiter.acquire();
|
|
214
|
+
let attempts = 0;
|
|
215
|
+
let lastError;
|
|
216
|
+
while (attempts <= this.config.maxRetries) {
|
|
217
|
+
try {
|
|
218
|
+
const stream = this.provider.generateStream(messages, tools);
|
|
219
|
+
for await (const chunk of stream) {
|
|
220
|
+
yield chunk;
|
|
221
|
+
}
|
|
222
|
+
this.recordSuccess();
|
|
223
|
+
return;
|
|
224
|
+
}
|
|
225
|
+
catch (err) {
|
|
226
|
+
lastError = err;
|
|
227
|
+
attempts++;
|
|
228
|
+
if (attempts <= this.config.maxRetries && shouldRetry(err)) {
|
|
229
|
+
this.stats.retries++;
|
|
230
|
+
if (isRateLimitError(err)) {
|
|
231
|
+
this.stats.rateLimitHits++;
|
|
232
|
+
}
|
|
233
|
+
const delay = Math.min(this.config.baseDelayMs * Math.pow(2, attempts - 1), this.config.maxDelayMs);
|
|
234
|
+
await sleep(delay);
|
|
235
|
+
continue;
|
|
236
|
+
}
|
|
237
|
+
this.recordFailure(err);
|
|
238
|
+
throw err;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
this.recordFailure(lastError);
|
|
242
|
+
throw lastError;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Get resilience statistics
|
|
246
|
+
*/
|
|
247
|
+
getStats() {
|
|
248
|
+
return {
|
|
249
|
+
...this.stats,
|
|
250
|
+
circuitBreakerOpen: this.circuitBreaker.isOpen,
|
|
251
|
+
availableTokens: this.rateLimiter.availableTokens,
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Reset statistics
|
|
256
|
+
*/
|
|
257
|
+
resetStats() {
|
|
258
|
+
this.stats = {
|
|
259
|
+
totalRequests: 0,
|
|
260
|
+
rateLimitHits: 0,
|
|
261
|
+
retries: 0,
|
|
262
|
+
circuitBreakerTrips: 0,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// ============================================================================
|
|
267
|
+
// Factory Function
|
|
268
|
+
// ============================================================================
|
|
269
|
+
/**
|
|
270
|
+
* Wrap any provider with resilience features
|
|
271
|
+
*/
|
|
272
|
+
export function withResilience(provider, config) {
|
|
273
|
+
return new ResilientProvider(provider, config);
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Provider-specific recommended configurations
|
|
277
|
+
*/
|
|
278
|
+
export const PROVIDER_RESILIENCE_CONFIGS = {
|
|
279
|
+
anthropic: {
|
|
280
|
+
maxRequestsPerMinute: 50,
|
|
281
|
+
maxRetries: 4,
|
|
282
|
+
baseDelayMs: 1500,
|
|
283
|
+
maxDelayMs: 40000,
|
|
284
|
+
},
|
|
285
|
+
openai: {
|
|
286
|
+
maxRequestsPerMinute: 60,
|
|
287
|
+
maxRetries: 3,
|
|
288
|
+
baseDelayMs: 1000,
|
|
289
|
+
maxDelayMs: 30000,
|
|
290
|
+
},
|
|
291
|
+
google: {
|
|
292
|
+
maxRequestsPerMinute: 60,
|
|
293
|
+
maxRetries: 3,
|
|
294
|
+
baseDelayMs: 1000,
|
|
295
|
+
maxDelayMs: 30000,
|
|
296
|
+
},
|
|
297
|
+
deepseek: {
|
|
298
|
+
maxRequestsPerMinute: 30,
|
|
299
|
+
maxRetries: 4,
|
|
300
|
+
baseDelayMs: 2000,
|
|
301
|
+
maxDelayMs: 45000,
|
|
302
|
+
},
|
|
303
|
+
xai: {
|
|
304
|
+
maxRequestsPerMinute: 40,
|
|
305
|
+
maxRetries: 3,
|
|
306
|
+
baseDelayMs: 1500,
|
|
307
|
+
maxDelayMs: 35000,
|
|
308
|
+
},
|
|
309
|
+
ollama: {
|
|
310
|
+
maxRequestsPerMinute: 100,
|
|
311
|
+
maxRetries: 2,
|
|
312
|
+
baseDelayMs: 500,
|
|
313
|
+
maxDelayMs: 10000,
|
|
314
|
+
enableCircuitBreaker: false, // Local, less likely to need circuit breaker
|
|
315
|
+
},
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* Wrap a provider with resilience using provider-specific defaults
|
|
319
|
+
*/
|
|
320
|
+
export function withProviderResilience(provider, providerId, overrides) {
|
|
321
|
+
const defaults = PROVIDER_RESILIENCE_CONFIGS[providerId] ?? {};
|
|
322
|
+
return new ResilientProvider(provider, { ...defaults, ...overrides });
|
|
323
|
+
}
|
|
324
|
+
//# sourceMappingURL=resilientProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resilientProvider.js","sourceRoot":"","sources":["../../src/providers/resilientProvider.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AA6BnE,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E,MAAM,mBAAmB,GAAG;IAC1B,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,mBAAmB;IACnB,KAAK;IACL,gBAAgB;IAChB,eAAe;IACf,WAAW;IACX,YAAY;IACZ,UAAU;CACX,CAAC;AAEF,MAAM,wBAAwB,GAAG;IAC/B,SAAS;IACT,WAAW;IACX,SAAS;IACT,YAAY;IACZ,cAAc;IACd,YAAY;IACZ,QAAQ;IACR,yBAAyB;IACzB,KAAK;IACL,KAAK;IACL,KAAK;IACL,aAAa;IACb,qBAAqB;IACrB,iBAAiB;IACjB,uBAAuB;IACvB,KAAK;CACN,CAAC;AAEF,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;IAC5C,OAAO,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;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IAAI;QACjB,UAAU,EAAE,KAAK;KAClB;IACD,MAAM,EAAE;QACN,oBAAoB,EAAE,EAAE;QACxB,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,KAAK;KAClB;IACD,QAAQ,EAAE;QACR,oBAAoB,EAAE,EAAE;QACxB,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,KAAK;KAClB;IACD,GAAG,EAAE;QACH,oBAAoB,EAAE,EAAE;QACxB,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,IAAI;QACjB,UAAU,EAAE,KAAK;KAClB;IACD,MAAM,EAAE;QACN,oBAAoB,EAAE,GAAG;QACzB,UAAU,EAAE,CAAC;QACb,WAAW,EAAE,GAAG;QAChB,UAAU,EAAE,KAAK;QACjB,oBAAoB,EAAE,KAAK,EAAE,6CAA6C;KAC3E;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACpC,QAAqB,EACrB,UAAkB,EAClB,SAA4C;IAE5C,MAAM,QAAQ,GAAG,2BAA2B,CAAC,UAAU,CAAC,IAAI,EAAE,CAAC;IAC/D,OAAO,IAAI,iBAAiB,CAAC,QAAQ,EAAE,EAAE,GAAG,QAAQ,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;AACxE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "erosolar-cli",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.13",
|
|
4
4
|
"description": "Unified AI agent framework for the command line - Multi-provider support with schema-driven tools, code intelligence, and transparent reasoning",
|
|
5
5
|
"main": "dist/bin/erosolar-optimized.js",
|
|
6
6
|
"type": "module",
|