@conquext/core 0.1.0

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/index.js ADDED
@@ -0,0 +1,657 @@
1
+ // src/schemas.ts
2
+ import { z } from "zod";
3
+ var UserContextSchema = z.object({
4
+ id: z.string().min(1),
5
+ name: z.string().optional(),
6
+ email: z.string().email().optional(),
7
+ team: z.string().optional(),
8
+ plan: z.string().optional()
9
+ });
10
+ var TaskContextSchema = z.object({
11
+ id: z.string().min(1),
12
+ title: z.string().optional(),
13
+ type: z.string().optional(),
14
+ priority: z.enum(["low", "medium", "high", "critical"]).optional()
15
+ });
16
+ var SessionContextSchema = z.object({
17
+ id: z.string().min(1),
18
+ conversationId: z.string().optional(),
19
+ parentCallId: z.string().optional()
20
+ });
21
+ var ObservabilityContextSchema = z.object({
22
+ user: UserContextSchema.optional(),
23
+ task: TaskContextSchema.optional(),
24
+ session: SessionContextSchema.optional(),
25
+ labels: z.record(z.string(), z.string()).optional()
26
+ });
27
+ var UsageEventInputSchema = z.object({
28
+ model: z.string().min(1),
29
+ provider: z.string().min(1),
30
+ requested_model: z.string().optional(),
31
+ input_tokens: z.number().int().nonnegative(),
32
+ output_tokens: z.number().int().nonnegative(),
33
+ total_tokens: z.number().int().nonnegative().optional(),
34
+ cost: z.number().nonnegative().optional(),
35
+ latency_ms: z.number().nonnegative(),
36
+ status: z.enum(["success", "error"]),
37
+ error: z.string().optional(),
38
+ streaming: z.boolean().optional(),
39
+ time_to_first_token_ms: z.number().nonnegative().optional(),
40
+ cache_read_tokens: z.number().int().nonnegative().optional(),
41
+ cache_write_tokens: z.number().int().nonnegative().optional(),
42
+ context: ObservabilityContextSchema.optional()
43
+ });
44
+
45
+ // src/errors.ts
46
+ var BudgetExhaustedError = class extends Error {
47
+ scope;
48
+ scopeId;
49
+ spent;
50
+ limit;
51
+ window;
52
+ resetAt;
53
+ constructor(params) {
54
+ super(
55
+ `Budget exhausted for ${params.scope} "${params.scopeId}": $${params.spent.toFixed(2)} spent of $${params.limit.toFixed(2)} ${params.window} limit`
56
+ );
57
+ this.name = "BudgetExhaustedError";
58
+ this.scope = params.scope;
59
+ this.scopeId = params.scopeId;
60
+ this.spent = params.spent;
61
+ this.limit = params.limit;
62
+ this.window = params.window;
63
+ this.resetAt = params.resetAt;
64
+ }
65
+ };
66
+
67
+ // src/pricing-table.json
68
+ var pricing_table_default = {
69
+ updatedAt: "2025-06-01",
70
+ models: {
71
+ "gpt-4o": { provider: "openai", input_per_million: 2.5, output_per_million: 10 },
72
+ "gpt-4o-mini": { provider: "openai", input_per_million: 0.15, output_per_million: 0.6 },
73
+ "gpt-4-turbo": { provider: "openai", input_per_million: 10, output_per_million: 30 },
74
+ "gpt-3.5-turbo": { provider: "openai", input_per_million: 0.5, output_per_million: 1.5 },
75
+ o1: { provider: "openai", input_per_million: 15, output_per_million: 60 },
76
+ "o1-mini": { provider: "openai", input_per_million: 3, output_per_million: 12 },
77
+ "o3-mini": { provider: "openai", input_per_million: 1.1, output_per_million: 4.4 },
78
+ "claude-opus-4-20250514": { provider: "anthropic", input_per_million: 15, output_per_million: 75, cache_read_per_million: 1.5, cache_write_per_million: 18.75 },
79
+ "claude-sonnet-4-20250514": { provider: "anthropic", input_per_million: 3, output_per_million: 15, cache_read_per_million: 0.3, cache_write_per_million: 3.75 },
80
+ "claude-haiku-3-5": { provider: "anthropic", input_per_million: 0.8, output_per_million: 4, cache_read_per_million: 0.08, cache_write_per_million: 1 },
81
+ "gemini-2.0-flash": { provider: "google", input_per_million: 0.1, output_per_million: 0.4 },
82
+ "gemini-1.5-pro": { provider: "google", input_per_million: 1.25, output_per_million: 5 },
83
+ "gemini-1.5-flash": { provider: "google", input_per_million: 0.075, output_per_million: 0.3 }
84
+ }
85
+ };
86
+
87
+ // src/pricing.ts
88
+ var PricingEngine = class _PricingEngine {
89
+ table;
90
+ sortedModelKeys;
91
+ constructor(config) {
92
+ this.table = _PricingEngine.resolve(config);
93
+ this.sortedModelKeys = Object.keys(this.table.models).sort((a, b) => b.length - a.length);
94
+ }
95
+ static resolve(config) {
96
+ if (config === "builtin") {
97
+ return pricing_table_default;
98
+ }
99
+ if ("updatedAt" in config && "models" in config) {
100
+ return config;
101
+ }
102
+ const base = pricing_table_default;
103
+ return {
104
+ updatedAt: base.updatedAt,
105
+ models: { ...base.models, ...config.overrides }
106
+ };
107
+ }
108
+ calculateCost(event) {
109
+ const pricing = this.findModel(event.model);
110
+ if (!pricing) return 0;
111
+ let cost = 0;
112
+ const standardInput = event.input_tokens - (event.cache_read_tokens ?? 0);
113
+ cost += standardInput / 1e6 * pricing.input_per_million;
114
+ if (event.cache_read_tokens && pricing.cache_read_per_million) {
115
+ cost += event.cache_read_tokens / 1e6 * pricing.cache_read_per_million;
116
+ }
117
+ if (event.cache_write_tokens && pricing.cache_write_per_million) {
118
+ cost += event.cache_write_tokens / 1e6 * pricing.cache_write_per_million;
119
+ }
120
+ cost += event.output_tokens / 1e6 * pricing.output_per_million;
121
+ return cost;
122
+ }
123
+ isPricingMiss(model) {
124
+ return this.findModel(model) === void 0;
125
+ }
126
+ findModel(model) {
127
+ if (this.table.models[model]) {
128
+ return this.table.models[model];
129
+ }
130
+ for (const key of this.sortedModelKeys) {
131
+ if (model.startsWith(key)) {
132
+ return this.table.models[key];
133
+ }
134
+ }
135
+ return void 0;
136
+ }
137
+ };
138
+
139
+ // src/memory-backend.ts
140
+ var MemoryBackend = class {
141
+ events = [];
142
+ async write(events) {
143
+ this.events.push(...events);
144
+ }
145
+ async query(query) {
146
+ return this.events.filter((event) => {
147
+ if (event.timestamp < query.from || event.timestamp > query.to) return false;
148
+ if (query.user && event.context?.user?.id !== query.user) return false;
149
+ if (query.task && event.context?.task?.id !== query.task) return false;
150
+ if (query.session && event.context?.session?.id !== query.session) return false;
151
+ if (query.model && event.model !== query.model) return false;
152
+ if (query.provider && event.provider !== query.provider) return false;
153
+ if (query.labels) {
154
+ const eventLabels = event.context?.labels ?? {};
155
+ for (const [key, value] of Object.entries(query.labels)) {
156
+ if (eventLabels[key] !== value) return false;
157
+ }
158
+ }
159
+ return true;
160
+ });
161
+ }
162
+ async close() {
163
+ this.events = [];
164
+ }
165
+ getAll() {
166
+ return [...this.events];
167
+ }
168
+ get size() {
169
+ return this.events.length;
170
+ }
171
+ };
172
+
173
+ // src/batch.ts
174
+ var DEFAULT_BATCH_CONFIG = {
175
+ maxSize: 100,
176
+ flushInterval: 5e3
177
+ };
178
+ var BatchProcessor = class {
179
+ buffer = [];
180
+ timer = null;
181
+ backend;
182
+ config;
183
+ closed = false;
184
+ constructor(backend, config) {
185
+ this.backend = backend;
186
+ this.config = { ...DEFAULT_BATCH_CONFIG, ...config };
187
+ this.startTimer();
188
+ }
189
+ async add(event) {
190
+ if (this.closed) return;
191
+ this.buffer.push(event);
192
+ if (this.buffer.length >= this.config.maxSize) {
193
+ await this.flush();
194
+ }
195
+ }
196
+ async flush() {
197
+ if (this.buffer.length === 0) return;
198
+ const batch = this.buffer;
199
+ this.buffer = [];
200
+ await this.backend.write(batch);
201
+ }
202
+ async close() {
203
+ this.closed = true;
204
+ this.stopTimer();
205
+ await this.flush();
206
+ await this.backend.close();
207
+ }
208
+ get pending() {
209
+ return this.buffer.length;
210
+ }
211
+ startTimer() {
212
+ if (this.config.flushInterval > 0) {
213
+ this.timer = setInterval(() => {
214
+ this.flush().catch(() => {
215
+ });
216
+ }, this.config.flushInterval);
217
+ if (this.timer && typeof this.timer === "object" && "unref" in this.timer) {
218
+ this.timer.unref();
219
+ }
220
+ }
221
+ }
222
+ stopTimer() {
223
+ if (this.timer) {
224
+ clearInterval(this.timer);
225
+ this.timer = null;
226
+ }
227
+ }
228
+ };
229
+
230
+ // src/context.ts
231
+ import { AsyncLocalStorage } from "async_hooks";
232
+ var storage = new AsyncLocalStorage();
233
+ var ContextManager = {
234
+ get() {
235
+ return storage.getStore();
236
+ },
237
+ run(context, fn) {
238
+ return storage.run(context, fn);
239
+ },
240
+ merge(base, override) {
241
+ if (!base && !override) return {};
242
+ if (!base) return override;
243
+ if (!override) return base;
244
+ return {
245
+ user: override.user ?? base.user,
246
+ task: override.task ?? base.task,
247
+ session: override.session ?? base.session,
248
+ labels: { ...base.labels, ...override.labels }
249
+ };
250
+ }
251
+ };
252
+
253
+ // src/adapter.ts
254
+ function defineAdapter(config) {
255
+ return {
256
+ name: config.name,
257
+ instrumentedMethods: config.instrumentedMethods,
258
+ extractUsage: config.extractUsage,
259
+ extractStreamUsage: config.extractStreamUsage ?? defaultStreamExtractor
260
+ };
261
+ }
262
+ function defaultStreamExtractor(_stream) {
263
+ throw new Error("Streaming not supported by this adapter. Implement extractStreamUsage.");
264
+ }
265
+ function createTrackedStream(source, onComplete) {
266
+ const chunks = [];
267
+ let usage;
268
+ let done = false;
269
+ const iterator = {
270
+ [Symbol.asyncIterator]() {
271
+ const sourceIterator = source[Symbol.asyncIterator]();
272
+ return {
273
+ async next() {
274
+ const result = await sourceIterator.next();
275
+ if (result.done) {
276
+ done = true;
277
+ usage = onComplete(chunks);
278
+ return result;
279
+ }
280
+ chunks.push(result.value);
281
+ return result;
282
+ }
283
+ };
284
+ }
285
+ };
286
+ return Object.assign(iterator, {
287
+ getUsage() {
288
+ if (done && usage) return Promise.resolve(usage);
289
+ return new Promise((resolve, reject) => {
290
+ const timeoutId = setTimeout(() => {
291
+ clearInterval(check);
292
+ reject(new Error("Stream usage not available \u2014 stream may not have been fully consumed"));
293
+ }, 3e4);
294
+ const check = setInterval(() => {
295
+ if (done && usage) {
296
+ clearInterval(check);
297
+ clearTimeout(timeoutId);
298
+ resolve(usage);
299
+ }
300
+ }, 10);
301
+ });
302
+ }
303
+ });
304
+ }
305
+
306
+ // src/callbacks.ts
307
+ var CallbackDispatcher = class {
308
+ config;
309
+ errorCounts = /* @__PURE__ */ new Map();
310
+ constructor(config) {
311
+ this.config = config;
312
+ }
313
+ dispatch(event) {
314
+ try {
315
+ this.config.event?.(event);
316
+ } catch {
317
+ }
318
+ if (this.config.costThreshold && event.cost >= this.config.costThreshold.threshold) {
319
+ try {
320
+ this.config.costThreshold.handler(event);
321
+ } catch {
322
+ }
323
+ }
324
+ if (this.config.errorSpike) {
325
+ this.checkErrorSpike(event);
326
+ }
327
+ }
328
+ checkErrorSpike(event) {
329
+ const cfg = this.config.errorSpike;
330
+ const windowMs = parseWindow(cfg.window);
331
+ const now = Date.now();
332
+ const key = event.model;
333
+ let entry = this.errorCounts.get(key);
334
+ if (!entry || now - entry.windowStart > windowMs) {
335
+ entry = { errors: 0, total: 0, windowStart: now };
336
+ this.errorCounts.set(key, entry);
337
+ }
338
+ entry.total++;
339
+ if (event.status === "error") entry.errors++;
340
+ if (entry.total >= 5) {
341
+ const rate = entry.errors / entry.total;
342
+ if (rate >= cfg.threshold) {
343
+ try {
344
+ cfg.handler(event.model, rate);
345
+ } catch {
346
+ }
347
+ }
348
+ }
349
+ }
350
+ };
351
+ function parseWindow(window) {
352
+ const match = window.match(/^(\d+)(s|m|h)$/);
353
+ if (!match) return 5 * 60 * 1e3;
354
+ const [, num, unit] = match;
355
+ const multipliers = { s: 1e3, m: 6e4, h: 36e5 };
356
+ return Number(num) * multipliers[unit];
357
+ }
358
+
359
+ // src/budget.ts
360
+ var WINDOW_DURATIONS = {
361
+ hourly: 36e5,
362
+ daily: 864e5,
363
+ monthly: 2592e6
364
+ // 30 days
365
+ };
366
+ var BudgetEngine = class {
367
+ config;
368
+ accumulators = {
369
+ user: createAccumulator(),
370
+ team: createAccumulator(),
371
+ task: createAccumulator()
372
+ };
373
+ constructor(config) {
374
+ this.config = config;
375
+ }
376
+ check(context, model, estimatedCost) {
377
+ if (!context) return { exceeded: false };
378
+ if (this.config.perUser && context.user?.id) {
379
+ const result = this.checkScope("user", context.user.id, this.config.perUser, model, estimatedCost);
380
+ if (result) return result;
381
+ }
382
+ if (this.config.perTeam && context.user?.team) {
383
+ const result = this.checkScope("team", context.user.team, this.config.perTeam, model, estimatedCost);
384
+ if (result) return result;
385
+ }
386
+ if (this.config.perTask && context.task?.id) {
387
+ const result = this.checkScope("task", context.task.id, this.config.perTask, model, estimatedCost);
388
+ if (result) return result;
389
+ }
390
+ return { exceeded: false };
391
+ }
392
+ accumulate(event) {
393
+ const now = Date.now();
394
+ if (event.context?.user?.id) {
395
+ addToAccumulator(this.accumulators.user, event.context.user.id, event.cost, now);
396
+ }
397
+ if (event.context?.user?.team) {
398
+ addToAccumulator(this.accumulators.team, event.context.user.team, event.cost, now);
399
+ }
400
+ if (event.context?.task?.id) {
401
+ addToAccumulator(this.accumulators.task, event.context.task.id, event.cost, now);
402
+ }
403
+ }
404
+ checkScope(scope, scopeId, limits, model, estimatedCost) {
405
+ const acc = this.accumulators[scope];
406
+ const now = Date.now();
407
+ for (const [window, limit] of Object.entries(limits)) {
408
+ if (limit === void 0) continue;
409
+ const spent = getSpent(acc, scopeId, window, now);
410
+ const projected = spent + estimatedCost;
411
+ if (projected > limit) {
412
+ return this.handleExceeded(scope, scopeId, spent, limit, window, model);
413
+ }
414
+ if (this.config.enforcement === "downgrade") {
415
+ const threshold = this.config.downgradeThreshold ?? 0.8;
416
+ if (spent / limit >= threshold) {
417
+ const downgradeModel = this.config.downgrades?.[model];
418
+ if (downgradeModel) {
419
+ return { exceeded: false, downgrade: downgradeModel };
420
+ }
421
+ }
422
+ }
423
+ }
424
+ return void 0;
425
+ }
426
+ handleExceeded(scope, scopeId, spent, limit, window, model) {
427
+ if (this.config.enforcement === "hard") {
428
+ throw new BudgetExhaustedError({ scope, scopeId, spent, limit, window });
429
+ }
430
+ if (this.config.enforcement === "downgrade") {
431
+ const downgradeModel = this.config.downgrades?.[model];
432
+ if (downgradeModel) {
433
+ return { exceeded: true, scope, scopeId, spent, limit, window, downgrade: downgradeModel };
434
+ }
435
+ throw new BudgetExhaustedError({ scope, scopeId, spent, limit, window });
436
+ }
437
+ return { exceeded: true, scope, scopeId, spent, limit, window };
438
+ }
439
+ };
440
+ function createAccumulator() {
441
+ return {
442
+ hourly: /* @__PURE__ */ new Map(),
443
+ daily: /* @__PURE__ */ new Map(),
444
+ monthly: /* @__PURE__ */ new Map(),
445
+ total: /* @__PURE__ */ new Map()
446
+ };
447
+ }
448
+ function addToAccumulator(acc, key, cost, now) {
449
+ for (const window of ["hourly", "daily", "monthly"]) {
450
+ const map = acc[window];
451
+ const entry = map.get(key);
452
+ const duration = WINDOW_DURATIONS[window];
453
+ if (!entry || now - entry.windowStart > duration) {
454
+ map.set(key, { amount: cost, windowStart: now });
455
+ } else {
456
+ entry.amount += cost;
457
+ }
458
+ }
459
+ acc.total.set(key, (acc.total.get(key) ?? 0) + cost);
460
+ }
461
+ function getSpent(acc, key, window, now) {
462
+ if (window === "total") {
463
+ return acc.total.get(key) ?? 0;
464
+ }
465
+ const entry = acc[window].get(key);
466
+ if (!entry) return 0;
467
+ const duration = WINDOW_DURATIONS[window];
468
+ if (now - entry.windowStart > duration) return 0;
469
+ return entry.amount;
470
+ }
471
+
472
+ // src/observatory.ts
473
+ import { ulid } from "ulid";
474
+ var Observatory = class {
475
+ backend;
476
+ pricing;
477
+ batch;
478
+ defaultContext;
479
+ disabled;
480
+ callbacks;
481
+ budgetEngine;
482
+ constructor(config) {
483
+ this.disabled = config.disabled ?? false;
484
+ this.backend = config.backend;
485
+ this.pricing = new PricingEngine(config.pricing ?? "builtin");
486
+ this.batch = new BatchProcessor(config.backend, config.batching);
487
+ this.defaultContext = config.defaultContext;
488
+ this.callbacks = config.on ? new CallbackDispatcher(config.on) : void 0;
489
+ this.budgetEngine = config.budgets ? new BudgetEngine(config.budgets) : void 0;
490
+ }
491
+ async record(input) {
492
+ if (this.disabled) return;
493
+ const validated = UsageEventInputSchema.parse(input);
494
+ const pricingMiss = this.pricing.isPricingMiss(validated.model);
495
+ const cost = validated.cost ?? (pricingMiss ? 0 : this.pricing.calculateCost(validated));
496
+ const resolvedContext = ContextManager.merge(this.defaultContext, validated.context);
497
+ const event = {
498
+ ...validated,
499
+ id: ulid(),
500
+ timestamp: /* @__PURE__ */ new Date(),
501
+ total_tokens: validated.total_tokens ?? validated.input_tokens + validated.output_tokens,
502
+ cost,
503
+ pricing_miss: pricingMiss || void 0,
504
+ context: Object.keys(resolvedContext).length > 0 ? resolvedContext : void 0
505
+ };
506
+ await this.batch.add(event);
507
+ this.budgetEngine?.accumulate(event);
508
+ this.callbacks?.dispatch(event);
509
+ }
510
+ async track(fn, opts) {
511
+ if (this.disabled) return fn();
512
+ const start = performance.now();
513
+ let result;
514
+ try {
515
+ result = await fn();
516
+ } catch (err) {
517
+ const latency_ms2 = performance.now() - start;
518
+ await this.record({
519
+ model: "unknown",
520
+ provider: opts.provider.name,
521
+ input_tokens: 0,
522
+ output_tokens: 0,
523
+ latency_ms: latency_ms2,
524
+ status: "error",
525
+ error: err instanceof Error ? err.message : String(err),
526
+ context: opts.context
527
+ });
528
+ throw err;
529
+ }
530
+ const latency_ms = performance.now() - start;
531
+ const usage = opts.provider.extractUsage(result);
532
+ const mergedContext = ContextManager.merge(ContextManager.get(), opts.context);
533
+ await this.record({
534
+ model: usage.model,
535
+ provider: opts.provider.name,
536
+ input_tokens: usage.input_tokens,
537
+ output_tokens: usage.output_tokens,
538
+ cache_read_tokens: usage.cache_read_tokens,
539
+ cache_write_tokens: usage.cache_write_tokens,
540
+ latency_ms,
541
+ status: "success",
542
+ context: mergedContext
543
+ });
544
+ return result;
545
+ }
546
+ instrument(client, adapter) {
547
+ if (this.disabled) return client;
548
+ const obs = this;
549
+ const handler = {
550
+ get(target, prop, receiver) {
551
+ const value = Reflect.get(target, prop, receiver);
552
+ if (typeof prop === "string" && adapter.instrumentedMethods.includes(prop) && typeof value === "function") {
553
+ return (...args) => {
554
+ return obs.track(
555
+ () => value.apply(target, args),
556
+ { provider: adapter, context: ContextManager.get() }
557
+ );
558
+ };
559
+ }
560
+ if (typeof prop === "string" && typeof value === "object" && value !== null) {
561
+ const hasMatchingMethod = adapter.instrumentedMethods.some(
562
+ (m) => m === prop || m.startsWith(`${prop}.`)
563
+ );
564
+ if (hasMatchingMethod) {
565
+ return new Proxy(value, makeNestedHandler(obs, adapter, prop));
566
+ }
567
+ }
568
+ return value;
569
+ }
570
+ };
571
+ return new Proxy(client, handler);
572
+ }
573
+ async withContext(ctx, fn) {
574
+ if (this.disabled) return fn();
575
+ return ContextManager.run(ctx, fn);
576
+ }
577
+ middleware(opts) {
578
+ const obs = this;
579
+ return (req, _res, next) => {
580
+ const ctx = opts.extractContext(req);
581
+ return ContextManager.run(ctx, next);
582
+ };
583
+ }
584
+ async flush() {
585
+ await this.batch.flush();
586
+ }
587
+ async close() {
588
+ await this.batch.close();
589
+ }
590
+ };
591
+ function makeNestedHandler(obs, adapter, parentPath) {
592
+ return {
593
+ get(target, prop, receiver) {
594
+ const value = Reflect.get(target, prop, receiver);
595
+ const fullPath = `${parentPath}.${String(prop)}`;
596
+ if (typeof prop === "string" && adapter.instrumentedMethods.includes(fullPath) && typeof value === "function") {
597
+ return (...args) => {
598
+ return obs.track(
599
+ () => value.apply(target, args),
600
+ { provider: adapter, context: ContextManager.get() }
601
+ );
602
+ };
603
+ }
604
+ if (typeof prop === "string" && typeof value === "object" && value !== null) {
605
+ const hasMatchingMethod = adapter.instrumentedMethods.some(
606
+ (m) => m === fullPath || m.startsWith(`${fullPath}.`)
607
+ );
608
+ if (hasMatchingMethod) {
609
+ return new Proxy(value, makeNestedHandler(obs, adapter, fullPath));
610
+ }
611
+ }
612
+ return value;
613
+ }
614
+ };
615
+ }
616
+
617
+ // src/noop.ts
618
+ var NoopObservatory = class {
619
+ async record() {
620
+ }
621
+ async track(fn) {
622
+ return fn();
623
+ }
624
+ instrument(client) {
625
+ return client;
626
+ }
627
+ async withContext(_ctx, fn) {
628
+ return fn();
629
+ }
630
+ middleware() {
631
+ return (_req, _res, next) => next();
632
+ }
633
+ async flush() {
634
+ }
635
+ async close() {
636
+ }
637
+ };
638
+ export {
639
+ BatchProcessor,
640
+ BudgetEngine,
641
+ BudgetExhaustedError,
642
+ CallbackDispatcher,
643
+ ContextManager,
644
+ DEFAULT_BATCH_CONFIG,
645
+ MemoryBackend,
646
+ NoopObservatory,
647
+ ObservabilityContextSchema,
648
+ Observatory,
649
+ PricingEngine,
650
+ SessionContextSchema,
651
+ TaskContextSchema,
652
+ UsageEventInputSchema,
653
+ UserContextSchema,
654
+ createTrackedStream,
655
+ defineAdapter
656
+ };
657
+ //# sourceMappingURL=index.js.map