beth-copilot 1.0.13 → 1.0.15

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 (104) hide show
  1. package/CHANGELOG.md +195 -170
  2. package/README.md +408 -185
  3. package/bin/cli.js +65 -4
  4. package/dist/cli/commands/doctor.e2e.test.d.ts +8 -0
  5. package/dist/cli/commands/doctor.e2e.test.d.ts.map +1 -0
  6. package/dist/cli/commands/doctor.e2e.test.js +428 -0
  7. package/dist/cli/commands/doctor.e2e.test.js.map +1 -0
  8. package/dist/cli/commands/doctor.test.js +1 -1
  9. package/dist/cli/commands/help.e2e.test.d.ts +9 -0
  10. package/dist/cli/commands/help.e2e.test.d.ts.map +1 -0
  11. package/dist/cli/commands/help.e2e.test.js +150 -0
  12. package/dist/cli/commands/help.e2e.test.js.map +1 -0
  13. package/dist/cli/commands/init.test.d.ts +6 -0
  14. package/dist/cli/commands/init.test.d.ts.map +1 -0
  15. package/dist/cli/commands/init.test.js +289 -0
  16. package/dist/cli/commands/init.test.js.map +1 -0
  17. package/dist/cli/commands/mcp.e2e.test.d.ts +9 -0
  18. package/dist/cli/commands/mcp.e2e.test.d.ts.map +1 -0
  19. package/dist/cli/commands/mcp.e2e.test.js +139 -0
  20. package/dist/cli/commands/mcp.e2e.test.js.map +1 -0
  21. package/dist/cli/commands/pipeline.e2e.test.d.ts +9 -0
  22. package/dist/cli/commands/pipeline.e2e.test.d.ts.map +1 -0
  23. package/dist/cli/commands/pipeline.e2e.test.js +192 -0
  24. package/dist/cli/commands/pipeline.e2e.test.js.map +1 -0
  25. package/dist/cli/commands/quickstart.test.d.ts +6 -0
  26. package/dist/cli/commands/quickstart.test.d.ts.map +1 -0
  27. package/dist/cli/commands/quickstart.test.js +232 -0
  28. package/dist/cli/commands/quickstart.test.js.map +1 -0
  29. package/dist/core/agents/frontmatter.test.d.ts +8 -0
  30. package/dist/core/agents/frontmatter.test.d.ts.map +1 -0
  31. package/dist/core/agents/frontmatter.test.js +589 -0
  32. package/dist/core/agents/frontmatter.test.js.map +1 -0
  33. package/dist/core/agents/handoffs.test.d.ts +8 -0
  34. package/dist/core/agents/handoffs.test.d.ts.map +1 -0
  35. package/dist/core/agents/handoffs.test.js +320 -0
  36. package/dist/core/agents/handoffs.test.js.map +1 -0
  37. package/dist/core/agents/loader.test.js +1 -1
  38. package/dist/core/agents/suite.test.d.ts +8 -0
  39. package/dist/core/agents/suite.test.d.ts.map +1 -0
  40. package/dist/core/agents/suite.test.js +207 -0
  41. package/dist/core/agents/suite.test.js.map +1 -0
  42. package/dist/core/agents/tools.test.d.ts +8 -0
  43. package/dist/core/agents/tools.test.d.ts.map +1 -0
  44. package/dist/core/agents/tools.test.js +332 -0
  45. package/dist/core/agents/tools.test.js.map +1 -0
  46. package/dist/init.test.js +288 -0
  47. package/dist/providers/azure.d.ts +147 -0
  48. package/dist/providers/azure.d.ts.map +1 -0
  49. package/dist/providers/azure.js +491 -0
  50. package/dist/providers/azure.js.map +1 -0
  51. package/dist/providers/azure.test.d.ts +11 -0
  52. package/dist/providers/azure.test.d.ts.map +1 -0
  53. package/dist/providers/azure.test.js +330 -0
  54. package/dist/providers/azure.test.js.map +1 -0
  55. package/dist/providers/config.d.ts +87 -0
  56. package/dist/providers/config.d.ts.map +1 -0
  57. package/dist/providers/config.js +193 -0
  58. package/dist/providers/config.js.map +1 -0
  59. package/dist/providers/config.test.d.ts +7 -0
  60. package/dist/providers/config.test.d.ts.map +1 -0
  61. package/dist/providers/config.test.js +370 -0
  62. package/dist/providers/config.test.js.map +1 -0
  63. package/dist/providers/index.d.ts +18 -0
  64. package/dist/providers/index.d.ts.map +1 -0
  65. package/dist/providers/index.js +14 -0
  66. package/dist/providers/index.js.map +1 -0
  67. package/dist/providers/interface.d.ts +191 -0
  68. package/dist/providers/interface.d.ts.map +1 -0
  69. package/dist/providers/interface.js +94 -0
  70. package/dist/providers/interface.js.map +1 -0
  71. package/dist/providers/retry.d.ts +128 -0
  72. package/dist/providers/retry.d.ts.map +1 -0
  73. package/dist/providers/retry.js +205 -0
  74. package/dist/providers/retry.js.map +1 -0
  75. package/dist/providers/retry.test.d.ts +7 -0
  76. package/dist/providers/retry.test.d.ts.map +1 -0
  77. package/dist/providers/retry.test.js +439 -0
  78. package/dist/providers/retry.test.js.map +1 -0
  79. package/dist/providers/streaming.d.ts +157 -0
  80. package/dist/providers/streaming.d.ts.map +1 -0
  81. package/dist/providers/streaming.js +233 -0
  82. package/dist/providers/streaming.js.map +1 -0
  83. package/dist/providers/streaming.test.d.ts +7 -0
  84. package/dist/providers/streaming.test.d.ts.map +1 -0
  85. package/dist/providers/streaming.test.js +372 -0
  86. package/dist/providers/streaming.test.js.map +1 -0
  87. package/dist/providers/types.d.ts +209 -0
  88. package/dist/providers/types.d.ts.map +1 -0
  89. package/dist/providers/types.js +53 -0
  90. package/dist/providers/types.js.map +1 -0
  91. package/dist/providers/types.test.d.ts +7 -0
  92. package/dist/providers/types.test.d.ts.map +1 -0
  93. package/dist/providers/types.test.js +141 -0
  94. package/dist/providers/types.test.js.map +1 -0
  95. package/package.json +60 -56
  96. package/sbom.json +3302 -8
  97. package/templates/.github/agents/beth.agent.md +329 -329
  98. package/templates/.github/agents/developer.agent.md +572 -572
  99. package/templates/.github/agents/product-manager.agent.md +272 -272
  100. package/templates/.github/agents/researcher.agent.md +338 -338
  101. package/templates/.github/agents/security-reviewer.agent.md +465 -465
  102. package/templates/.github/agents/tester.agent.md +496 -496
  103. package/templates/.github/agents/ux-designer.agent.md +393 -393
  104. package/templates/mcp.json.example +4 -0
@@ -0,0 +1,439 @@
1
+ /**
2
+ * Retry Utility Tests
3
+ *
4
+ * Tests for exponential backoff retry logic.
5
+ */
6
+ import { describe, it, mock } from 'node:test';
7
+ import assert from 'node:assert';
8
+ import { calculateDelay, isTransientError, retry, RetryError } from './retry.js';
9
+ describe('RetryError', () => {
10
+ describe('constructor', () => {
11
+ it('should set message correctly', () => {
12
+ const lastError = new Error('Last error');
13
+ const error = new RetryError('All attempts failed', 3, lastError);
14
+ assert.strictEqual(error.message, 'All attempts failed');
15
+ });
16
+ it('should set attempts correctly', () => {
17
+ const lastError = new Error('Last error');
18
+ const error = new RetryError('Failed', 5, lastError);
19
+ assert.strictEqual(error.attempts, 5);
20
+ });
21
+ it('should set lastError correctly', () => {
22
+ const lastError = new Error('Original failure');
23
+ const error = new RetryError('Failed', 3, lastError);
24
+ assert.strictEqual(error.lastError, lastError);
25
+ assert.strictEqual(error.lastError.message, 'Original failure');
26
+ });
27
+ it('should set name to "RetryError"', () => {
28
+ const lastError = new Error('Test');
29
+ const error = new RetryError('Failed', 1, lastError);
30
+ assert.strictEqual(error.name, 'RetryError');
31
+ });
32
+ it('should inherit from Error', () => {
33
+ const lastError = new Error('Test');
34
+ const error = new RetryError('Failed', 1, lastError);
35
+ assert.ok(error instanceof Error);
36
+ assert.ok(error instanceof RetryError);
37
+ });
38
+ it('should have a stack trace', () => {
39
+ const lastError = new Error('Test');
40
+ const error = new RetryError('Failed', 1, lastError);
41
+ assert.ok(typeof error.stack === 'string');
42
+ assert.ok(error.stack.length > 0);
43
+ });
44
+ });
45
+ });
46
+ describe('calculateDelay', () => {
47
+ describe('without jitter', () => {
48
+ it('should return baseDelay for attempt 0', () => {
49
+ const delay = calculateDelay(0, 1000, 30000, false);
50
+ assert.strictEqual(delay, 1000);
51
+ });
52
+ it('should return 2*baseDelay for attempt 1 (exponential backoff)', () => {
53
+ const delay = calculateDelay(1, 1000, 30000, false);
54
+ assert.strictEqual(delay, 2000);
55
+ });
56
+ it('should return 4*baseDelay for attempt 2', () => {
57
+ const delay = calculateDelay(2, 1000, 30000, false);
58
+ assert.strictEqual(delay, 4000);
59
+ });
60
+ it('should return 8*baseDelay for attempt 3', () => {
61
+ const delay = calculateDelay(3, 1000, 30000, false);
62
+ assert.strictEqual(delay, 8000);
63
+ });
64
+ it('should follow formula baseDelay * 2^attempt', () => {
65
+ const baseDelay = 500;
66
+ const maxDelay = 100000;
67
+ for (let attempt = 0; attempt < 5; attempt++) {
68
+ const expected = baseDelay * Math.pow(2, attempt);
69
+ const actual = calculateDelay(attempt, baseDelay, maxDelay, false);
70
+ assert.strictEqual(actual, expected, `attempt ${attempt} should be ${expected}`);
71
+ }
72
+ });
73
+ it('should cap at maxDelay', () => {
74
+ const delay = calculateDelay(10, 1000, 5000, false);
75
+ assert.strictEqual(delay, 5000);
76
+ });
77
+ it('should cap when exponential exceeds maxDelay', () => {
78
+ // attempt 4 with base 1000 = 16000, but maxDelay is 10000
79
+ const delay = calculateDelay(4, 1000, 10000, false);
80
+ assert.strictEqual(delay, 10000);
81
+ });
82
+ it('should work with small baseDelay', () => {
83
+ const delay = calculateDelay(0, 1, 100, false);
84
+ assert.strictEqual(delay, 1);
85
+ });
86
+ });
87
+ describe('with jitter', () => {
88
+ it('should return value in expected range (0.5x to 1.5x) for attempt 0', () => {
89
+ const baseDelay = 1000;
90
+ const lowerBound = baseDelay * 0.5;
91
+ const upperBound = baseDelay * 1.5;
92
+ // Run multiple times to test jitter variance
93
+ for (let i = 0; i < 10; i++) {
94
+ const delay = calculateDelay(0, baseDelay, 30000, true);
95
+ assert.ok(delay >= lowerBound - 1, `delay ${delay} should be >= ${lowerBound}`);
96
+ assert.ok(delay <= upperBound + 1, `delay ${delay} should be <= ${upperBound}`);
97
+ }
98
+ });
99
+ it('should return varying values due to randomness', () => {
100
+ const delays = new Set();
101
+ // Generate many delays; with jitter they should vary
102
+ for (let i = 0; i < 50; i++) {
103
+ const delay = calculateDelay(0, 1000, 30000, true);
104
+ delays.add(delay);
105
+ }
106
+ // With 50 samples and jitter, we should have multiple unique values
107
+ assert.ok(delays.size > 1, 'Jitter should produce varying delays');
108
+ });
109
+ it('should respect maxDelay cap even with jitter', () => {
110
+ const maxDelay = 1000;
111
+ for (let i = 0; i < 10; i++) {
112
+ const delay = calculateDelay(5, 1000, maxDelay, true);
113
+ assert.ok(delay <= maxDelay * 1.5 + 1, `delay should not greatly exceed maxDelay * 1.5`);
114
+ }
115
+ });
116
+ it('should return integers (floor applied)', () => {
117
+ for (let i = 0; i < 10; i++) {
118
+ const delay = calculateDelay(0, 1000, 30000, true);
119
+ assert.strictEqual(Math.floor(delay), delay, 'delay should be an integer');
120
+ }
121
+ });
122
+ });
123
+ });
124
+ describe('isTransientError', () => {
125
+ describe('HTTP status codes', () => {
126
+ describe('retryable status codes', () => {
127
+ const retryableStatuses = [429, 500, 502, 503, 504];
128
+ for (const status of retryableStatuses) {
129
+ it(`should return true for HTTP ${status}`, () => {
130
+ const error = new Error('Test error');
131
+ error.status = status;
132
+ const result = isTransientError(error);
133
+ assert.strictEqual(result, true);
134
+ });
135
+ it(`should return true for HTTP ${status} using statusCode property`, () => {
136
+ const error = new Error('Test error');
137
+ error.statusCode = status;
138
+ const result = isTransientError(error);
139
+ assert.strictEqual(result, true);
140
+ });
141
+ }
142
+ });
143
+ describe('non-retryable status codes', () => {
144
+ const nonRetryableStatuses = [400, 401, 403, 404, 405, 422];
145
+ for (const status of nonRetryableStatuses) {
146
+ it(`should return false for HTTP ${status}`, () => {
147
+ const error = new Error('Test error');
148
+ error.status = status;
149
+ const result = isTransientError(error);
150
+ assert.strictEqual(result, false);
151
+ });
152
+ }
153
+ });
154
+ });
155
+ describe('network error codes', () => {
156
+ const transientNetworkCodes = [
157
+ 'ECONNRESET',
158
+ 'ETIMEDOUT',
159
+ 'ECONNREFUSED',
160
+ 'ENOTFOUND',
161
+ 'ENETUNREACH',
162
+ 'EHOSTUNREACH',
163
+ 'EPIPE',
164
+ 'EAI_AGAIN',
165
+ ];
166
+ for (const code of transientNetworkCodes) {
167
+ it(`should return true for ${code}`, () => {
168
+ const error = new Error('Network error');
169
+ error.code = code;
170
+ const result = isTransientError(error);
171
+ assert.strictEqual(result, true, `${code} should be transient`);
172
+ });
173
+ }
174
+ it('should return false for unknown error code', () => {
175
+ const error = new Error('Unknown error');
176
+ error.code = 'UNKNOWN_CODE';
177
+ const result = isTransientError(error);
178
+ assert.strictEqual(result, false);
179
+ });
180
+ });
181
+ describe('errors without status or code', () => {
182
+ it('should return false for plain Error', () => {
183
+ const error = new Error('Plain error');
184
+ const result = isTransientError(error);
185
+ assert.strictEqual(result, false);
186
+ });
187
+ it('should return false for error with only message', () => {
188
+ const error = new Error('Something went wrong');
189
+ const result = isTransientError(error);
190
+ assert.strictEqual(result, false);
191
+ });
192
+ });
193
+ describe('custom retryableStatuses', () => {
194
+ it('should use custom retryable statuses', () => {
195
+ const error = new Error('Test');
196
+ error.status = 418; // I'm a teapot
197
+ // With default, 418 is not retryable
198
+ assert.strictEqual(isTransientError(error), false);
199
+ // With custom statuses including 418
200
+ assert.strictEqual(isTransientError(error, [418]), true);
201
+ });
202
+ it('should not treat default retryable status as retryable if excluded from custom list', () => {
203
+ const error = new Error('Test');
204
+ error.status = 429;
205
+ // With custom statuses not including 429
206
+ assert.strictEqual(isTransientError(error, [500]), false);
207
+ });
208
+ it('should still check network codes even with custom statuses', () => {
209
+ const error = new Error('Network error');
210
+ error.code = 'ECONNRESET';
211
+ // Network error codes are checked independently of HTTP statuses
212
+ assert.strictEqual(isTransientError(error, [400]), true);
213
+ });
214
+ });
215
+ });
216
+ describe('retry', () => {
217
+ describe('successful execution', () => {
218
+ it('should return result on first success', async () => {
219
+ const fn = mock.fn(async () => 'success');
220
+ const result = await retry(fn, { baseDelay: 1, jitter: false });
221
+ assert.strictEqual(result, 'success');
222
+ assert.strictEqual(fn.mock.calls.length, 1);
223
+ });
224
+ it('should return the value from async function', async () => {
225
+ const fn = mock.fn(async () => ({ data: [1, 2, 3] }));
226
+ const result = await retry(fn, { baseDelay: 1 });
227
+ assert.deepStrictEqual(result, { data: [1, 2, 3] });
228
+ });
229
+ });
230
+ describe('retry on transient error', () => {
231
+ it('should retry and eventually succeed', async () => {
232
+ let attempts = 0;
233
+ const fn = async () => {
234
+ attempts++;
235
+ if (attempts < 3) {
236
+ const error = new Error('Server error');
237
+ error.status = 500;
238
+ throw error;
239
+ }
240
+ return 'success after retry';
241
+ };
242
+ const result = await retry(fn, { baseDelay: 1, jitter: false });
243
+ assert.strictEqual(result, 'success after retry');
244
+ assert.strictEqual(attempts, 3);
245
+ });
246
+ it('should retry on rate limit error', async () => {
247
+ let attempts = 0;
248
+ const fn = async () => {
249
+ attempts++;
250
+ if (attempts === 1) {
251
+ const error = new Error('Rate limited');
252
+ error.status = 429;
253
+ throw error;
254
+ }
255
+ return 'success';
256
+ };
257
+ const result = await retry(fn, { baseDelay: 1, jitter: false });
258
+ assert.strictEqual(result, 'success');
259
+ assert.strictEqual(attempts, 2);
260
+ });
261
+ it('should retry on network error', async () => {
262
+ let attempts = 0;
263
+ const fn = async () => {
264
+ attempts++;
265
+ if (attempts === 1) {
266
+ const error = new Error('Connection reset');
267
+ error.code = 'ECONNRESET';
268
+ throw error;
269
+ }
270
+ return 'connected';
271
+ };
272
+ const result = await retry(fn, { baseDelay: 1, jitter: false });
273
+ assert.strictEqual(result, 'connected');
274
+ assert.strictEqual(attempts, 2);
275
+ });
276
+ });
277
+ describe('exhausted retries', () => {
278
+ it('should throw RetryError after exhausting maxRetries', async () => {
279
+ const fn = async () => {
280
+ const error = new Error('Always fails');
281
+ error.status = 503;
282
+ throw error;
283
+ };
284
+ await assert.rejects(retry(fn, { maxRetries: 2, baseDelay: 1, jitter: false }), (error) => {
285
+ assert.ok(error instanceof RetryError);
286
+ assert.strictEqual(error.attempts, 3); // 1 initial + 2 retries
287
+ assert.strictEqual(error.lastError.message, 'Always fails');
288
+ return true;
289
+ });
290
+ });
291
+ it('should include total attempts in error message', async () => {
292
+ const fn = async () => {
293
+ const error = new Error('Fail');
294
+ error.status = 500;
295
+ throw error;
296
+ };
297
+ await assert.rejects(retry(fn, { maxRetries: 3, baseDelay: 1, jitter: false }), (error) => {
298
+ assert.ok(error instanceof RetryError);
299
+ assert.ok(error.message.includes('4'), 'Should mention 4 total attempts');
300
+ return true;
301
+ });
302
+ });
303
+ });
304
+ describe('non-transient error', () => {
305
+ it('should throw immediately without retry for 400 error', async () => {
306
+ let attempts = 0;
307
+ const fn = async () => {
308
+ attempts++;
309
+ const error = new Error('Bad request');
310
+ error.status = 400;
311
+ throw error;
312
+ };
313
+ await assert.rejects(retry(fn, { maxRetries: 3, baseDelay: 1 }), (error) => {
314
+ assert.ok(error instanceof Error);
315
+ assert.strictEqual(error.message, 'Bad request');
316
+ assert.ok(!(error instanceof RetryError), 'Should not be RetryError');
317
+ return true;
318
+ });
319
+ assert.strictEqual(attempts, 1, 'Should only attempt once');
320
+ });
321
+ it('should throw immediately without retry for 401 error', async () => {
322
+ let attempts = 0;
323
+ const fn = async () => {
324
+ attempts++;
325
+ const error = new Error('Unauthorized');
326
+ error.status = 401;
327
+ throw error;
328
+ };
329
+ await assert.rejects(retry(fn, { maxRetries: 3, baseDelay: 1 }), (error) => {
330
+ assert.ok(error instanceof Error);
331
+ return true;
332
+ });
333
+ assert.strictEqual(attempts, 1);
334
+ });
335
+ it('should throw immediately for 403 error', async () => {
336
+ let attempts = 0;
337
+ const fn = async () => {
338
+ attempts++;
339
+ const error = new Error('Forbidden');
340
+ error.status = 403;
341
+ throw error;
342
+ };
343
+ await assert.rejects(retry(fn, { maxRetries: 3, baseDelay: 1 }));
344
+ assert.strictEqual(attempts, 1);
345
+ });
346
+ it('should throw immediately for plain error without status', async () => {
347
+ let attempts = 0;
348
+ const fn = async () => {
349
+ attempts++;
350
+ throw new Error('Unknown error');
351
+ };
352
+ await assert.rejects(retry(fn, { maxRetries: 3, baseDelay: 1 }));
353
+ assert.strictEqual(attempts, 1);
354
+ });
355
+ });
356
+ describe('onRetry callback', () => {
357
+ it('should call onRetry with correct arguments', async () => {
358
+ const onRetryCalls = [];
359
+ let attempts = 0;
360
+ const fn = async () => {
361
+ attempts++;
362
+ if (attempts < 3) {
363
+ const error = new Error('Server error');
364
+ error.status = 500;
365
+ throw error;
366
+ }
367
+ return 'done';
368
+ };
369
+ await retry(fn, {
370
+ baseDelay: 1,
371
+ jitter: false,
372
+ onRetry: (error, attempt, delay) => {
373
+ onRetryCalls.push({ error, attempt, delay });
374
+ },
375
+ });
376
+ assert.strictEqual(onRetryCalls.length, 2);
377
+ // First retry
378
+ assert.strictEqual(onRetryCalls[0].attempt, 1);
379
+ assert.strictEqual(onRetryCalls[0].delay, 1); // baseDelay * 2^0
380
+ // Second retry
381
+ assert.strictEqual(onRetryCalls[1].attempt, 2);
382
+ assert.strictEqual(onRetryCalls[1].delay, 2); // baseDelay * 2^1
383
+ });
384
+ it('should not call onRetry on successful first attempt', async () => {
385
+ const onRetry = mock.fn();
386
+ const fn = async () => 'success';
387
+ await retry(fn, { baseDelay: 1, onRetry });
388
+ assert.strictEqual(onRetry.mock.calls.length, 0);
389
+ });
390
+ });
391
+ describe('maxRetries = 0', () => {
392
+ it('should only attempt once with maxRetries=0', async () => {
393
+ let attempts = 0;
394
+ const fn = async () => {
395
+ attempts++;
396
+ const error = new Error('Fail');
397
+ error.status = 500;
398
+ throw error;
399
+ };
400
+ await assert.rejects(retry(fn, { maxRetries: 0, baseDelay: 1 }), (error) => {
401
+ assert.ok(error instanceof RetryError);
402
+ assert.strictEqual(error.attempts, 1);
403
+ return true;
404
+ });
405
+ assert.strictEqual(attempts, 1);
406
+ });
407
+ it('should succeed with maxRetries=0 if first attempt succeeds', async () => {
408
+ const fn = async () => 'immediate success';
409
+ const result = await retry(fn, { maxRetries: 0, baseDelay: 1 });
410
+ assert.strictEqual(result, 'immediate success');
411
+ });
412
+ });
413
+ describe('options defaults', () => {
414
+ it('should work with empty options object', async () => {
415
+ const fn = async () => 'result';
416
+ // Uses default options
417
+ const result = await retry(fn, {});
418
+ assert.strictEqual(result, 'result');
419
+ });
420
+ it('should work with no options', async () => {
421
+ const fn = async () => 'result';
422
+ const result = await retry(fn);
423
+ assert.strictEqual(result, 'result');
424
+ });
425
+ });
426
+ describe('error conversion', () => {
427
+ it('should convert non-Error throws to Error', async () => {
428
+ const fn = async () => {
429
+ throw 'string error'; // eslint-disable-line @typescript-eslint/only-throw-error
430
+ };
431
+ await assert.rejects(retry(fn, { maxRetries: 0, baseDelay: 1 }), (error) => {
432
+ assert.ok(error instanceof RetryError);
433
+ assert.ok(error.lastError instanceof Error);
434
+ return true;
435
+ });
436
+ });
437
+ });
438
+ });
439
+ //# sourceMappingURL=retry.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retry.test.js","sourceRoot":"","sources":["../../src/providers/retry.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAEjF,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IAC1B,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;QAC3B,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;YACtC,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;YAC1C,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,qBAAqB,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YAElE,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+BAA+B,EAAE,GAAG,EAAE;YACvC,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC;YAC1C,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;YAErD,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC;QACxC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,gCAAgC,EAAE,GAAG,EAAE;YACxC,MAAM,SAAS,GAAG,IAAI,KAAK,CAAC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AC,6BAA6B,EAAE,KAAK,IAAI,EAAE;YAC3C,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE,CAAC,QAAQ,CAAC;YAEhC,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,EAAE,CAAC,CAAC;YAE/B,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;QAChC,EAAE,CAAC,0CAA0C,EAAE,KAAK,IAAI,EAAE;YACxD,MAAM,EAAE,GAAG,KAAK,IAAI,EAAE;gBACpB,MAAM,cAAc,CAAC,CAAC,0DAA0D;YAClF,CAAC,CAAC;YAEF,MAAM,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,KAAc,EAAE,EAAE;gBAClF,MAAM,CAAC,EAAE,CAAC,KAAK,YAAY,UAAU,CAAC,CAAC;gBACvC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC,SAAS,YAAY,KAAK,CAAC,CAAC;gBAC5C,OAAO,IAAI,CAAC;YACd,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,157 @@
1
+ /**
2
+ * Stream Handler Utilities for LLM Streaming Responses
3
+ *
4
+ * Provides utilities for processing incremental streaming responses from LLM APIs.
5
+ * Handles content accumulation, tool call assembly from deltas, and stream transformation.
6
+ */
7
+ import type { ChatChunk, ChatRole, FinishReason, ToolCall } from './types.js';
8
+ /**
9
+ * Accumulates streamed chat response chunks into a complete response.
10
+ *
11
+ * Handles the complexity of:
12
+ * - Concatenating content chunks as they arrive
13
+ * - Assembling tool calls from incremental deltas (by index)
14
+ * - Tracking the finish reason from the final chunk
15
+ * - Managing multiple in-flight tool calls simultaneously
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * const accumulator = new StreamAccumulator();
20
+ *
21
+ * for await (const chunk of stream) {
22
+ * accumulator.processChunk(chunk);
23
+ * }
24
+ *
25
+ * console.log(accumulator.getContent());
26
+ * console.log(accumulator.getToolCalls());
27
+ * console.log(accumulator.getFinishReason());
28
+ * ```
29
+ */
30
+ export declare class StreamAccumulator {
31
+ /** Accumulated text content from all chunks */
32
+ private content;
33
+ /** Map of tool call index to partially assembled tool call */
34
+ private toolCallMap;
35
+ /** Finish reason from the final chunk */
36
+ private finishReason;
37
+ /** Role from the response (typically from first chunk) */
38
+ private role;
39
+ /**
40
+ * Process a single chunk from the stream.
41
+ *
42
+ * Updates internal state with any content, tool call deltas,
43
+ * role, or finish reason present in the chunk.
44
+ *
45
+ * @param chunk - The chat chunk to process
46
+ */
47
+ processChunk(chunk: ChatChunk): void;
48
+ /**
49
+ * Process a tool call delta and merge it into the accumulated state.
50
+ *
51
+ * Tool calls arrive incrementally:
52
+ * - First chunk: id, type, function.name
53
+ * - Subsequent chunks: function.arguments (appended)
54
+ *
55
+ * @param delta - The tool call delta to process
56
+ */
57
+ private processToolCallDelta;
58
+ /**
59
+ * Get the accumulated text content.
60
+ *
61
+ * @returns The complete text content from all processed chunks
62
+ */
63
+ getContent(): string;
64
+ /**
65
+ * Get the assembled tool calls.
66
+ *
67
+ * Returns tool calls sorted by their original index order.
68
+ *
69
+ * @returns Array of fully assembled tool calls
70
+ */
71
+ getToolCalls(): ToolCall[];
72
+ /**
73
+ * Get the finish reason from the final chunk.
74
+ *
75
+ * @returns The finish reason, or null if stream hasn't finished
76
+ */
77
+ getFinishReason(): FinishReason | null;
78
+ /**
79
+ * Get the role of the response.
80
+ *
81
+ * @returns The chat role (defaults to 'assistant' if not specified)
82
+ */
83
+ getRole(): ChatRole;
84
+ /**
85
+ * Reset the accumulator for reuse.
86
+ *
87
+ * Clears all accumulated state, allowing the accumulator to be
88
+ * reused for processing a new stream.
89
+ */
90
+ reset(): void;
91
+ }
92
+ /**
93
+ * Result of collecting a complete stream.
94
+ */
95
+ export interface CollectedStreamResult {
96
+ /** Accumulated text content */
97
+ content: string;
98
+ /** Assembled tool calls */
99
+ toolCalls: ToolCall[];
100
+ /** Finish reason from the final chunk */
101
+ finishReason: FinishReason | null;
102
+ }
103
+ /**
104
+ * Consume an entire stream and collect the results.
105
+ *
106
+ * This is a convenience function that uses StreamAccumulator internally
107
+ * to process all chunks and return the final aggregated result.
108
+ *
109
+ * @param stream - Async iterable of chat chunks
110
+ * @returns Promise resolving to the collected stream result
111
+ *
112
+ * @example
113
+ * ```typescript
114
+ * const stream = client.streamCompletion(messages);
115
+ * const result = await collectStream(stream);
116
+ *
117
+ * if (result.toolCalls.length > 0) {
118
+ * // Handle tool calls
119
+ * } else {
120
+ * console.log(result.content);
121
+ * }
122
+ * ```
123
+ */
124
+ export declare function collectStream(stream: AsyncIterable<ChatChunk>): Promise<CollectedStreamResult>;
125
+ /**
126
+ * Transform stream chunks using a mapping function.
127
+ *
128
+ * Creates a new async generator that yields transformed values
129
+ * for each chunk in the input stream.
130
+ *
131
+ * @typeParam T - The output type of the mapper function
132
+ * @param stream - Async iterable of chat chunks
133
+ * @param mapper - Function to transform each chunk
134
+ * @returns Async generator yielding transformed values
135
+ *
136
+ * @example
137
+ * ```typescript
138
+ * // Extract just the content from each chunk
139
+ * const contentStream = mapStream(stream, (chunk) => chunk.content ?? '');
140
+ *
141
+ * for await (const text of contentStream) {
142
+ * process.stdout.write(text);
143
+ * }
144
+ * ```
145
+ *
146
+ * @example
147
+ * ```typescript
148
+ * // Transform to custom event format
149
+ * const eventStream = mapStream(stream, (chunk) => ({
150
+ * type: 'delta',
151
+ * text: chunk.content,
152
+ * done: chunk.finish_reason !== null,
153
+ * }));
154
+ * ```
155
+ */
156
+ export declare function mapStream<T>(stream: AsyncIterable<ChatChunk>, mapper: (chunk: ChatChunk) => T): AsyncGenerator<T>;
157
+ //# sourceMappingURL=strea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