@observyze/sdk 0.1.4 → 0.1.5

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.
@@ -1,20 +1,107 @@
1
- import { SpanType, TokenUsage, Span as Span$1, TraceStatus, Trace as Trace$1 } from '@observyze/types';
2
-
3
1
  /**
4
2
  * SDK Configuration and Types
5
3
  */
6
-
4
+ /**
5
+ * Type of span operation
6
+ */
7
+ declare enum SpanType {
8
+ LLM = "llm",
9
+ TOOL = "tool",
10
+ AGENT = "agent",
11
+ CHAIN = "chain",
12
+ RETRIEVAL = "retrieval",
13
+ EMBEDDING = "embedding",
14
+ CUSTOM = "custom"
15
+ }
16
+ /**
17
+ * Status of trace execution
18
+ */
19
+ declare enum TraceStatus {
20
+ SUCCESS = "success",
21
+ ERROR = "error",
22
+ TIMEOUT = "timeout",
23
+ RUNNING = "running"
24
+ }
25
+ /**
26
+ * Error information for a span
27
+ */
28
+ interface SpanError {
29
+ message: string;
30
+ stack?: string;
31
+ code?: string;
32
+ }
33
+ /**
34
+ * Token usage information
35
+ */
36
+ interface TokenUsage {
37
+ input: number;
38
+ output: number;
39
+ total: number;
40
+ computed_pixels?: number;
41
+ audio_seconds?: number;
42
+ }
43
+ /**
44
+ * Individual operation within a trace
45
+ */
46
+ interface Span$1 {
47
+ span_id: string;
48
+ parent_span_id?: string;
49
+ name: string;
50
+ type: SpanType;
51
+ start_time: Date;
52
+ end_time: Date;
53
+ duration_ms: number;
54
+ input: any;
55
+ output: any;
56
+ error?: SpanError;
57
+ metadata: {
58
+ model?: string;
59
+ provider?: string;
60
+ temperature?: number;
61
+ max_tokens?: number;
62
+ [key: string]: any;
63
+ };
64
+ tokens?: TokenUsage;
65
+ }
66
+ /**
67
+ * Complete record of an AI workflow execution
68
+ */
69
+ interface Trace$1 {
70
+ trace_id: string;
71
+ organization_id: string;
72
+ project_id?: string;
73
+ name: string;
74
+ provider?: string;
75
+ model?: string;
76
+ status: TraceStatus;
77
+ start_time: Date;
78
+ end_time: Date;
79
+ duration_ms: number;
80
+ metadata: Record<string, any>;
81
+ spans: Span$1[];
82
+ tags: string[];
83
+ user_id?: string;
84
+ session_id?: string;
85
+ cost?: number;
86
+ cost_breakdown?: {
87
+ tokens: number;
88
+ pixels: number;
89
+ audio: number;
90
+ };
91
+ created_at: Date;
92
+ updated_at: Date;
93
+ }
7
94
  /**
8
95
  * Configuration for Observyze SDK client
9
96
  */
10
97
  interface ClientConfig {
11
98
  /**
12
- * API key for authentication with Observyze Ingestion Service
99
+ * API key for authentication with Observyze
13
100
  */
14
101
  apiKey: string;
15
102
  /**
16
- * Endpoint URL for the Ingestion Service
17
- * @default 'http://localhost:3001'
103
+ * Endpoint URL for the Observyze API
104
+ * @default 'https://api.observyze.com'
18
105
  */
19
106
  endpoint?: string;
20
107
  /**
@@ -28,10 +115,10 @@ interface ClientConfig {
28
115
  */
29
116
  flushInterval?: number;
30
117
  /**
31
- * Enable automatic instrumentation of popular LLM libraries
32
- * @default true
118
+ * Timeout for each ingestion HTTP attempt in milliseconds.
119
+ * @default 10000
33
120
  */
34
- enableAutoInstrumentation?: boolean;
121
+ requestTimeoutMs?: number;
35
122
  /**
36
123
  * Organization ID (optional, can be extracted from API key)
37
124
  */
@@ -46,63 +133,68 @@ interface ClientConfig {
46
133
  */
47
134
  debug?: boolean;
48
135
  /**
49
- * Dry run mode - don't send traces to server (useful for testing)
136
+ * Dry run mode don't send traces to server (useful for testing)
50
137
  * @default false
51
138
  */
52
139
  dryRun?: boolean;
53
140
  /**
54
- * Phase 5: Automatically scrub PII from trace output before network transmission
141
+ * Automatically scrub PII from trace output before network transmission
55
142
  * @default true
56
143
  */
57
144
  enablePiiRedaction?: boolean;
58
145
  /**
59
- * Phase 4: Autonomous Circuit Breaker
60
- * Hallucination score threshold (0-1) above which execution is blocked
146
+ * Capture prompt/completion content and arbitrary user metadata in traces.
147
+ * Set to false for metadata-only telemetry: names, inputs, outputs, errors,
148
+ * user/session identifiers, and tags are omitted locally before a trace
149
+ * can enter the dispatch buffer.
150
+ * @default true
151
+ */
152
+ captureContent?: boolean;
153
+ /**
154
+ * Hallucination threshold for checkGuardrails() calls.
61
155
  * @default 0.8
62
156
  */
63
157
  hallucinationThreshold?: number;
64
158
  /**
65
- * Phase 4: Autonomous Circuit Breaker
66
- * Safety score threshold (0-1) above which execution is blocked
159
+ * Safety threshold for checkGuardrails() calls.
67
160
  * @default 0.9
68
161
  */
69
162
  safetyThreshold?: number;
70
163
  /**
71
- * Minimum confidence threshold for circuit breaker blocking (0-1).
72
- * If confidence is below this threshold, high scores trigger alert-only instead of halt.
164
+ * Minimum confidence threshold for guardrail blocking (0-1).
165
+ * When confidence is below this value, high scores trigger an alert-only
166
+ * response instead of halting execution.
73
167
  * @default 0.4
74
168
  */
75
169
  confidenceThreshold?: number;
76
170
  /**
77
- * Evaluation service URL for real-time guardrail checks
78
- * In production, this should be https://api.observyze.com
79
- * @default 'http://localhost:3000'
171
+ * Evaluation service URL for guardrail checks.
172
+ * Defaults to the same value as `endpoint`.
80
173
  */
81
174
  evalEndpoint?: string;
82
175
  /**
83
- * Enable circuit breaker - block execution on high hallucination/safety scores
176
+ * Enable explicit guardrail methods (checkGuardrails, executeWithCircuitBreaker).
84
177
  * @default true
85
178
  */
86
179
  enableCircuitBreaker?: boolean;
87
180
  /**
88
- * Fail closed when evaluation service is unreachable.
89
- * If true, guardrail checks will block execution on errors (safe default).
90
- * If false, guardrail checks will allow execution on errors (fail open).
181
+ * Fail closed when the evaluation service is unreachable.
182
+ * true = block execution on errors (safe default).
183
+ * false = allow execution on errors.
91
184
  * @default true
92
185
  */
93
186
  failClosed?: boolean;
94
187
  /**
95
- * Automatically redirect LLM client (OpenAI, Anthropic) base URLs to Observyze proxy gateway
96
- * to ensure Redis-backed circuit breakers are enforced.
188
+ * Automatically redirect OpenAI/Anthropic base URLs through the Observyze
189
+ * proxy gateway to enforce Redis-backed circuit breakers.
97
190
  * @default true
98
191
  */
99
192
  enableProxyRedirect?: boolean;
100
193
  }
101
194
  /**
102
- * Internal configuration with defaults applied
195
+ * Internal configuration with all defaults applied
103
196
  */
104
- interface ResolvedClientConfig extends Required<ClientConfig> {
105
- }
197
+ type ResolvedClientConfig = Required<ClientConfig>;
106
198
  /**
107
199
  * Result of a connection test.
108
200
  * Verifies the SDK can reach Observyze and send a real trace end-to-end.
@@ -133,7 +225,7 @@ interface GuardrailResult {
133
225
  reason?: string;
134
226
  /** How the evaluation was performed */
135
227
  evaluationSource?: 'live' | 'consensus' | 'nli_fast_path' | 'error' | 'disabled' | 'fallback';
136
- /** Why a live evaluation didn't happen (only set when evaluationSource is 'error' or 'fallback') */
228
+ /** Why a live evaluation didn't happen */
137
229
  fallbackReason?: string;
138
230
  }
139
231
 
@@ -147,7 +239,8 @@ interface GuardrailResult {
147
239
  declare class Span {
148
240
  private data;
149
241
  private startTime;
150
- constructor(name: string, type: SpanType, parentSpanId?: string);
242
+ private readonly captureContent;
243
+ constructor(name: string, type: SpanType, parentSpanId?: string, captureContent?: boolean);
151
244
  /**
152
245
  * Set the input data for this span
153
246
  */
@@ -193,7 +286,8 @@ declare class Trace {
193
286
  private startTime;
194
287
  private spans;
195
288
  private ended;
196
- constructor(name: string, organizationId: string, projectId?: string);
289
+ private readonly captureContent;
290
+ constructor(name: string, organizationId: string, projectId?: string, captureContent?: boolean);
197
291
  /**
198
292
  * Start a new span within this trace
199
293
  */
@@ -240,30 +334,135 @@ declare class Trace {
240
334
  toJSON(): Omit<Trace$1, '_id' | 'created_at' | 'updated_at'>;
241
335
  }
242
336
 
337
+ interface LangChainRunnableLike {
338
+ invoke: (input: unknown, config?: unknown) => Promise<unknown>;
339
+ stream?: (input: unknown, config?: unknown) => Promise<AsyncIterable<unknown>> | AsyncIterable<unknown>;
340
+ [key: string]: unknown;
341
+ }
342
+ /**
343
+ * Instruments a LangChain-compatible Runnable boundary without taking a hard
344
+ * dependency on LangChain. It captures invoke() and stream(); provider-specific
345
+ * inner spans still require wrapping the underlying provider client.
346
+ */
347
+ declare function wrapLangChain<T extends LangChainRunnableLike>(runnable: T, nwClient: ObservyzeClient): T;
348
+
349
+ type Callable$2 = (...args: any[]) => any;
350
+ type GeminiMethodSurface = ({
351
+ generateContent: Callable$2;
352
+ generateContentStream?: Callable$2;
353
+ } | {
354
+ generateContent?: Callable$2;
355
+ generateContentStream: Callable$2;
356
+ }) & Record<string, unknown>;
357
+ type GeminiClientLike = GeminiMethodSurface | ({
358
+ models: GeminiMethodSurface;
359
+ } & Record<string, unknown>);
360
+ /** Supports both @google/generative-ai model objects and @google/genai clients. */
361
+ declare function wrapGemini<T extends GeminiClientLike>(client: T, nwClient: ObservyzeClient): T;
362
+
363
+ type Callable$1 = (...args: any[]) => any;
364
+ type VercelAILike = ({
365
+ generateText: Callable$1;
366
+ streamText?: Callable$1;
367
+ } | {
368
+ generateText?: Callable$1;
369
+ streamText: Callable$1;
370
+ }) & Record<string, unknown>;
371
+ /**
372
+ * Wraps the Vercel AI SDK function surface. A new object is returned because
373
+ * ESM namespace imports are immutable and cannot be monkey-patched safely.
374
+ */
375
+ declare function wrapVercelAI<T extends VercelAILike>(sdk: T, nwClient: ObservyzeClient): T;
376
+
377
+ type Callable = (...args: any[]) => any;
378
+ type LlamaIndexEngineLike = ({
379
+ query: Callable;
380
+ chat?: Callable;
381
+ } | {
382
+ query?: Callable;
383
+ chat: Callable;
384
+ }) & Record<string, unknown>;
385
+ /** Instruments LlamaIndex QueryEngine and ChatEngine method boundaries. */
386
+ declare function wrapLlamaIndex<T extends LlamaIndexEngineLike>(engine: T, nwClient: ObservyzeClient): T;
387
+
243
388
  /**
244
389
  * Auto-Instrumentation API
245
390
  * Provides nw.wrap() API for instrumenting LLM clients
246
391
  */
247
392
 
393
+ type ClientMethod = (...args: any[]) => any;
248
394
  /**
249
395
  * Supported client types for auto-instrumentation
250
396
  */
251
397
  type SupportedClient = {
252
398
  chat: {
253
399
  completions: {
254
- create: Function;
400
+ create: ClientMethod;
255
401
  };
256
402
  };
257
403
  } | {
258
404
  messages: {
259
- create: Function;
405
+ create: ClientMethod;
260
406
  };
261
- };
407
+ } | GeminiClientLike | VercelAILike | LlamaIndexEngineLike | LangChainRunnableLike;
262
408
  /**
263
409
  * Detect the type of LLM client and apply appropriate instrumentation
264
410
  */
265
411
  declare function wrap<T extends SupportedClient>(client: T, nwClient: ObservyzeClient): T;
266
412
 
413
+ interface ExecutionBudgetOptions {
414
+ /** Maximum provider/tool operations allowed in this run. */
415
+ maxCalls: number;
416
+ /** Maximum cumulative tokens. Omit when token usage is not available. */
417
+ maxTokens?: number;
418
+ /** Wall-clock deadline for the complete run in milliseconds. */
419
+ timeoutMs: number;
420
+ }
421
+ interface ExecutionBudgetStats {
422
+ callsUsed: number;
423
+ tokensUsed: number;
424
+ elapsedMs: number;
425
+ remainingCalls: number;
426
+ remainingTokens: number | null;
427
+ remainingMs: number;
428
+ aborted: boolean;
429
+ }
430
+ declare class ExecutionBudgetExceededError extends Error {
431
+ readonly dimension: 'calls' | 'tokens' | 'time';
432
+ readonly code = "OBSERVYZE_EXECUTION_BUDGET_EXCEEDED";
433
+ constructor(dimension: 'calls' | 'tokens' | 'time', message: string);
434
+ }
435
+ /**
436
+ * Active, process-local agent execution budget. Use one instance for one
437
+ * agent/session run and execute every provider/tool action through run().
438
+ * The callback receives an AbortSignal and must pass it to the underlying SDK
439
+ * for transport-level cancellation; run() still rejects at the deadline if a
440
+ * third-party SDK ignores the signal.
441
+ *
442
+ * @example
443
+ * ```typescript
444
+ * const budget = new ExecutionBudget({ maxCalls: 20, maxTokens: 50_000, timeoutMs: 30_000 })
445
+ *
446
+ * const result = await budget.run(async (signal) => {
447
+ * return openai.chat.completions.create({ ... }, { signal })
448
+ * })
449
+ * ```
450
+ */
451
+ declare class ExecutionBudget {
452
+ private readonly options;
453
+ private readonly startedAt;
454
+ private readonly controller;
455
+ private callsUsed;
456
+ private tokensUsed;
457
+ constructor(options: ExecutionBudgetOptions);
458
+ get signal(): AbortSignal;
459
+ get stats(): ExecutionBudgetStats;
460
+ abort(reason?: string): void;
461
+ consumeTokens(tokens: number): void;
462
+ run<T>(operation: (signal: AbortSignal) => Promise<T>, reservedTokens?: number): Promise<T>;
463
+ private assertTime;
464
+ }
465
+
267
466
  /**
268
467
  * Observyze SDK Client
269
468
  * Main entry point for instrumenting AI applications
@@ -279,16 +478,9 @@ declare class ObservyzeClient {
279
478
  private isShuttingDown;
280
479
  private readonly MAX_QUEUE_SIZE;
281
480
  private readonly RETRY_DELAYS;
282
- /**
283
- * Parse a JSON API error response and extract trace_id, error code, and message.
284
- * The api-gateway error handler includes these fields in every error response.
285
- */
481
+ private static readBoundedResponse;
482
+ private static retryAfterMs;
286
483
  private static parseApiError;
287
- /**
288
- * Format an API error into a user-friendly message with trace_id for correlation.
289
- * Example output:
290
- * "Observyze API error (401 [ref: err_a1b2c3d4]): MISSING_PROVIDER_KEY — No API key configured..."
291
- */
292
484
  private static formatApiError;
293
485
  constructor(config: ClientConfig);
294
486
  /**
@@ -304,7 +496,7 @@ declare class ObservyzeClient {
304
496
  */
305
497
  private startFlushTimer;
306
498
  /**
307
- * Flush all buffered traces to the Ingestion Service
499
+ * Flush all buffered traces to Observyze
308
500
  */
309
501
  flush(): Promise<void>;
310
502
  /**
@@ -324,7 +516,9 @@ declare class ObservyzeClient {
324
516
  */
325
517
  getConfig(): Readonly<ResolvedClientConfig>;
326
518
  /**
327
- * Wrap an LLM client (OpenAI, Anthropic) to enable auto-instrumentation
519
+ * Wrap a supported LLM client or framework boundary to enable auto-instrumentation.
520
+ *
521
+ * Supports: OpenAI, Anthropic, Google Gemini, Vercel AI SDK, LangChain, LlamaIndex.
328
522
  *
329
523
  * @example
330
524
  * ```typescript
@@ -332,86 +526,61 @@ declare class ObservyzeClient {
332
526
  * import { ObservyzeClient } from '@observyze/sdk'
333
527
  *
334
528
  * const nw = new ObservyzeClient({ apiKey: 'your-api-key' })
335
- * const openai = new OpenAI({ apiKey: 'openai-key' })
336
- *
337
- * // Wrap the client to enable auto-instrumentation
338
- * nw.wrap(openai)
529
+ * const openai = nw.wrap(new OpenAI({ apiKey: 'openai-key' }))
339
530
  *
340
531
  * // All calls are now automatically traced
341
532
  * const response = await openai.chat.completions.create({
342
- * model: 'gpt-4',
533
+ * model: 'gpt-4o',
343
534
  * messages: [{ role: 'user', content: 'Hello!' }]
344
535
  * })
345
536
  * ```
346
537
  */
347
538
  wrap<T extends SupportedClient>(client: T): T;
539
+ /** Create an active call/token/time budget for one agent execution. */
540
+ createExecutionBudget(options: ExecutionBudgetOptions): ExecutionBudget;
348
541
  /**
349
542
  * Verify that the SDK can reach Observyze and send traces end-to-end.
350
543
  *
351
- * This is the definitive "is my integration working?" test for SDK users.
352
- * It sends a real test trace through the EXACT same pipeline used by
353
- * `flush()` / the wrapped LLM clients (same endpoint, apiKey, retry logic),
354
- * so a successful call proves the whole chain works from your code:
355
- * - apiKey is valid and authorized
356
- * - endpoint is reachable from your environment
357
- * - organization / project resolution works
358
- * - the ingest pipeline accepts and stores traces
359
- *
360
544
  * @example
361
545
  * ```typescript
362
546
  * const nw = new ObservyzeClient({ apiKey: process.env.OBSERVYZE_API_KEY })
363
547
  * const result = await nw.testConnection()
364
- * // { ok: true, traceId: 'nw_xxx', message: 'Connection successful...' }
548
+ * // { ok: true, traceId: '...', message: 'Connection successful...' }
365
549
  * ```
366
- *
367
- * The returned traceId can be searched in the Observyze dashboard (Traces →
368
- * search the trace name "Observyze Connection Test") to confirm it landed.
369
550
  */
370
551
  testConnection(): Promise<TestConnectionResult>;
371
552
  /**
372
- * Sync local agent .history file to Observyze cloud
373
- * Parses JSON/NDJSON agent history and sends to ingestion endpoint.
553
+ * Sync a local agent .history file to Observyze cloud.
554
+ * Parses JSON/NDJSON agent history and sends to the ingestion endpoint.
374
555
  */
375
556
  syncLocalHistory(filePath: string): Promise<void>;
376
557
  /**
377
- * Industry-grade PII Redaction (Compliance & RBAC)
378
- *
379
- * Recursively scrubs PII from trace data before transmission to the cloud.
380
- * Coverage: emails, JWTs, bearer tokens, AWS/API keys, SSNs, credit cards,
381
- * phone numbers (US + E.164), IPv4/IPv6, passport numbers, ZIP codes, plus
382
- * key-based redaction for sensitive JSON fields (password, token, api_key, etc.).
383
- *
384
- * Design:
385
- * - Pure function, never mutates the original object
386
- * - Depth-limited to 16 levels to prevent stack overflow on deep agent outputs
387
- * - Key-aware: sensitive key names are fully redacted regardless of value format
388
- */
389
- private static readonly PII_PATTERNS;
390
- private static readonly SENSITIVE_KEYS;
391
- private static isSensitiveKey;
558
+ * Industry-grade PII redaction.
559
+ * Recursively scrubs PII from trace data before transmission.
560
+ */
392
561
  private sanitizePII;
393
562
  /**
394
- * Phase 4: Autonomous Circuit Breakers (Requirement 4.1)
395
- * Evaluate a trace or text for hallucination in real-time.
396
- * If hallucination score > hallucinationThreshold, the SDK blocks execution.
563
+ * Explicitly evaluate content before an application action.
564
+ * Requires an active Observyze subscription with guardrails enabled.
397
565
  *
398
566
  * Returns GuardrailResult with score: null when evaluation couldn't be performed.
399
- * In failClosed mode, null scores result in blocked execution.
400
- * In failOpen mode, null scores allow execution through.
567
+ * In failClosed mode (default), null scores block execution.
568
+ *
569
+ * @example
570
+ * ```typescript
571
+ * const result = await nw.checkGuardrails(llmOutput)
572
+ * if (!result.pass) {
573
+ * throw new Error('Guardrail blocked: ' + result.reason)
574
+ * }
575
+ * ```
401
576
  */
402
577
  checkGuardrails(content: string | any): Promise<GuardrailResult>;
403
578
  /**
404
- * Phase 4: Autonomous Circuit Breakers
405
- * Execute an agent action wrapped with the Circuit Breaker.
406
- * Pauses execution if hallucination score >= hallucinationThreshold and requests human review.
579
+ * Execute an application action only after an explicit pre-execution
580
+ * guardrail check passes.
407
581
  * @throws Error when execution is blocked by circuit breaker
408
582
  */
409
583
  executeWithCircuitBreaker<T>(agentExecution: () => Promise<T>, traceContext?: any): Promise<T>;
410
- /**
411
- * Phase 4: Bug Bounty Protocol (Automated) (Requirement 4.2)
412
- * Automatically shard persistent failure cases to external security researcher endpoints (e.g. HackerOne wrapper)
413
- */
414
- reportBugBounty(traceId: string, securityEndpoint: string, failureContext: any): Promise<void>;
415
584
  }
416
585
 
417
586
  /**
@@ -474,4 +643,4 @@ declare class ObservyzeSpanExporter {
474
643
  forceFlush(): Promise<void>;
475
644
  }
476
645
 
477
- export { type ClientConfig as C, ObservyzeClient as O, type ResolvedClientConfig as R, Span as S, type TestConnectionResult as T, type ObservyzeExporterConfig as a, ObservyzeSpanExporter as b, type SupportedClient as c, Trace as d, wrap as w };
646
+ export { type ClientConfig as C, ExecutionBudget as E, type GeminiClientLike as G, type LangChainRunnableLike as L, ObservyzeClient as O, type ResolvedClientConfig as R, Span as S, type TestConnectionResult as T, type VercelAILike as V, ExecutionBudgetExceededError as a, type ExecutionBudgetOptions as b, type ExecutionBudgetStats as c, type GuardrailResult as d, type LlamaIndexEngineLike as e, type ObservyzeExporterConfig as f, ObservyzeSpanExporter as g, type Span$1 as h, type SpanError as i, SpanType as j, type SupportedClient as k, type TokenUsage as l, Trace as m, type Trace$1 as n, TraceStatus as o, wrapGemini as p, wrapLangChain as q, wrapLlamaIndex as r, wrapVercelAI as s, wrap as w };
package/dist/index.d.mts CHANGED
@@ -1,11 +1,10 @@
1
- import { O as ObservyzeClient } from './index-IZdiaORv.mjs';
2
- export { C as ClientConfig, a as ObservyzeExporterConfig, b as ObservyzeSpanExporter, R as ResolvedClientConfig, S as Span, c as SupportedClient, T as TestConnectionResult, d as Trace, w as wrap } from './index-IZdiaORv.mjs';
3
- export { Span as SpanData, SpanError, SpanType, TokenUsage, Trace as TraceData, TraceStatus } from '@observyze/types';
1
+ import { O as ObservyzeClient } from './index-ClE8H5jj.mjs';
2
+ export { C as ClientConfig, E as ExecutionBudget, a as ExecutionBudgetExceededError, b as ExecutionBudgetOptions, c as ExecutionBudgetStats, G as GeminiClientLike, d as GuardrailResult, L as LangChainRunnableLike, e as LlamaIndexEngineLike, f as ObservyzeExporterConfig, g as ObservyzeSpanExporter, R as ResolvedClientConfig, S as Span, h as SpanData, i as SpanError, j as SpanType, k as SupportedClient, T as TestConnectionResult, l as TokenUsage, m as Trace, n as TraceData, o as TraceStatus, V as VercelAILike, w as wrap, p as wrapGemini, q as wrapLangChain, r as wrapLlamaIndex, s as wrapVercelAI } from './index-ClE8H5jj.mjs';
4
3
 
5
4
  interface OpenAIClient {
6
5
  chat: {
7
6
  completions: {
8
- create: Function;
7
+ create: (...args: any[]) => any;
9
8
  };
10
9
  };
11
10
  }
@@ -16,7 +15,7 @@ declare function wrapOpenAI(client: OpenAIClient, nwClient: ObservyzeClient): Op
16
15
 
17
16
  interface AnthropicClient {
18
17
  messages: {
19
- create: Function;
18
+ create: (...args: any[]) => any;
20
19
  };
21
20
  }
22
21
  /**
package/dist/index.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- import { O as ObservyzeClient } from './index-IZdiaORv.js';
2
- export { C as ClientConfig, a as ObservyzeExporterConfig, b as ObservyzeSpanExporter, R as ResolvedClientConfig, S as Span, c as SupportedClient, T as TestConnectionResult, d as Trace, w as wrap } from './index-IZdiaORv.js';
3
- export { Span as SpanData, SpanError, SpanType, TokenUsage, Trace as TraceData, TraceStatus } from '@observyze/types';
1
+ import { O as ObservyzeClient } from './index-ClE8H5jj.js';
2
+ export { C as ClientConfig, E as ExecutionBudget, a as ExecutionBudgetExceededError, b as ExecutionBudgetOptions, c as ExecutionBudgetStats, G as GeminiClientLike, d as GuardrailResult, L as LangChainRunnableLike, e as LlamaIndexEngineLike, f as ObservyzeExporterConfig, g as ObservyzeSpanExporter, R as ResolvedClientConfig, S as Span, h as SpanData, i as SpanError, j as SpanType, k as SupportedClient, T as TestConnectionResult, l as TokenUsage, m as Trace, n as TraceData, o as TraceStatus, V as VercelAILike, w as wrap, p as wrapGemini, q as wrapLangChain, r as wrapLlamaIndex, s as wrapVercelAI } from './index-ClE8H5jj.js';
4
3
 
5
4
  interface OpenAIClient {
6
5
  chat: {
7
6
  completions: {
8
- create: Function;
7
+ create: (...args: any[]) => any;
9
8
  };
10
9
  };
11
10
  }
@@ -16,7 +15,7 @@ declare function wrapOpenAI(client: OpenAIClient, nwClient: ObservyzeClient): Op
16
15
 
17
16
  interface AnthropicClient {
18
17
  messages: {
19
- create: Function;
18
+ create: (...args: any[]) => any;
20
19
  };
21
20
  }
22
21
  /**